diff --git a/Translation/ColumnTitleAnnotationTranslationExtractor.php b/Translation/ColumnTitleAnnotationTranslationExtractor.php index 90a98475..e0b88370 100644 --- a/Translation/ColumnTitleAnnotationTranslationExtractor.php +++ b/Translation/ColumnTitleAnnotationTranslationExtractor.php @@ -12,7 +12,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; -class ColumnTitleAnnotationTranslationExtractor implements FileVisitorInterface, \PHPParser_NodeVisitor, ContainerAwareInterface +class ColumnTitleAnnotationTranslationExtractor implements FileVisitorInterface, \PHPParser\NodeVisitor, ContainerAwareInterface { private $annotated; private $catalogue; @@ -29,23 +29,23 @@ public function beforeTraverse(array $nodes) $this->parsedClassName = null; } - public function enterNode(\PHPParser_Node $node) + public function enterNode(\PHPParser\Node $node) { - if ($node instanceof \PHPParser_Node_Stmt_Namespace) { + if ($node instanceof \PHPParser\Node\Stmt\Namespace_) { // Base namespace $this->parsedClassName = $node->name->toString(); - } elseif ($node instanceof \PHPParser_Node_Stmt_UseUse) { + } elseif ($node instanceof \PHPParser\Node\Stmt\UseUse) { // Don't worry about classes that don't import the grid mapper if ('APY_DataGridBundle_Grid_Mapping' == $node->name->toString('_')) { $this->annotated = true; } - } elseif ($node instanceof \PHPParser_Node_Stmt_Class) { + } elseif ($node instanceof \PHPParser\Node\Stmt\Class_) { // Append class name to base namespace $this->parsedClassName .= '\\' . $node->name; } } - public function leaveNode(\PHPParser_Node $node) + public function leaveNode(\PHPParser\Node $node) { } public function afterTraverse(array $nodes) @@ -61,7 +61,7 @@ public function visitPhpFile(\SplFileInfo $file, MessageCatalogue $catalogue, ar $this->catalogue = $catalogue; // Traverse document to assemble class name - $traverser = new \PHPParser_NodeTraverser(); + $traverser = new \PHPParser\NodeTraverser(); $traverser->addVisitor($this); $traverser->traverse($ast); @@ -84,7 +84,7 @@ public function visitPhpFile(\SplFileInfo $file, MessageCatalogue $catalogue, ar } } - public function visitTwigFile(\SplFileInfo $file, MessageCatalogue $catalogue, \Twig_Node $node) + public function visitTwigFile(\SplFileInfo $file, MessageCatalogue $catalogue, \Twig\Node $node) { }