> */ public function getNodeTypes() : array { return [Concat::class]; } /** * @param Concat $node */ public function refactor(Node $node) : ?Node { if (!$node->left instanceof String_ && !$node->right instanceof String_) { return null; } $node->left = $this->removeStringCast($node->left); $node->right = $this->removeStringCast($node->right); return $node; } private function removeStringCast(Expr $expr) : Expr { return $expr instanceof String_ ? $expr->expr : $expr; } }