Revert change

Sounds like isn't necessary
This commit is contained in:
Gabriel Caruso 2018-05-12 16:57:50 -03:00
parent 32617ecbac
commit 7e642e6024
No known key found for this signature in database
GPG Key ID: D93D6E258EFC438A
2 changed files with 4 additions and 1 deletions

View File

@ -19,6 +19,7 @@ parameters:
# known values
- '#Argument of an invalid type array<PhpParser\\Node>\|null supplied for foreach, only iterables are supported#' # 1
- '#Access to an undefined property PHPStan\\PhpDocParser\\Ast\\Node::\$name#' # 2
- '#Calling method getName\(\) on possibly null value of type Rector\\Builder\\Class_\\VariableInfo\|null#' # 1
- '#Method Rector\\Node\\NodeFactory::createNullConstant\(\) should return PhpParser\\Node\\Expr\\ConstFetch but returns PhpParser\\Node\\Expr#' # 1
- '#Method Rector\\Node\\NodeFactory::createNamespace\(\) should return PhpParser\\Node\\Stmt\\Namespace_ but returns PhpParser\\Node#' # 1

View File

@ -22,7 +22,7 @@ final class ReplaceVariableByPropertyFetchRector extends AbstractRector
private $variablesToPropertyFetchCollection;
/**
* @var VariableInfo
* @var VariableInfo|null
*/
private $activeVariableInfo;
@ -91,6 +91,8 @@ CODE_SAMPLE
public function isCandidate(Node $node): bool
{
$this->activeVariableInfo = null;
if (! $node instanceof Variable) {
return false;
}