fix MagicDisclosure

This commit is contained in:
TomasVotruba 2017-10-25 23:26:31 +02:00
parent 2a82e65279
commit bf86e49382
2 changed files with 3 additions and 3 deletions

View File

@ -69,7 +69,7 @@ final class PropertyFetchAnalyzer
}
$variableNodeTypes = $node->var->getAttribute(Attribute::TYPES);
if (in_array($type, $variableNodeTypes, true)) {
if (! in_array($type, $variableNodeTypes, true)) {
return false;
}

View File

@ -120,10 +120,10 @@ final class UnsetAndIssetToMethodCallRector extends AbstractRector
private function matchArrayDimFetch(ArrayDimFetch $arrayDimFetchNode): bool
{
$variableNodeType = $arrayDimFetchNode->var->getAttribute(Attribute::TYPES);
$variableNodeTypes = $arrayDimFetchNode->var->getAttribute(Attribute::TYPES);
foreach ($this->typeToMethodCalls as $type => $transformation) {
if ($variableNodeType === $type) {
if (in_array($type, $variableNodeTypes, true)) {
$this->activeTransformation = $transformation;
return true;