This commit is contained in:
TomasVotruba 2017-09-02 15:31:17 +02:00
parent 17f227997b
commit b35e0e54e5

View File

@ -58,6 +58,13 @@ final class GetterToPropertyRector extends AbstractRector
public function isCandidate(Node $node): bool
{
if (! $node instanceof MethodCall) {
return false;
}
dump($node);
die;
// finds $var = $this->get('some_service');
// finds $var = $this->get('some_service')->getData();
if ($node instanceof Assign && ($node->expr instanceof MethodCall || $node->var instanceof MethodCall)) {