> */ public function getNodeTypes() : array { return [FuncCall::class]; } /** * @param FuncCall $node */ public function refactor(Node $node) : ?Node { if ($node->isFirstClassCallable()) { return null; } if (!$this->isName($node, 'boolval')) { return null; } if (!isset($node->getArgs()[0])) { return null; } return new Bool_($node->getArgs()[0]->value); } }