> */ public function getNodeTypes() : array { return [FuncCall::class]; } /** * @param FuncCall $node */ public function refactor(Node $node) : ?Node { if (!$this->nodeNameResolver->isName($node, 'get_class')) { return null; } if ($node->isFirstClassCallable()) { return null; } if (!isset($node->getArgs()[0])) { return new ClassConstFetch(new Name('self'), 'class'); } $object = $node->getArgs()[0]->value; return new ClassConstFetch($object, 'class'); } public function provideMinPhpVersion() : int { return PhpVersionFeature::CLASS_ON_OBJECT; } }