mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 11:44:14 +01:00
fix MagicDisclosure
This commit is contained in:
parent
2a82e65279
commit
bf86e49382
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user