diff --git a/.editorconfig b/.editorconfig index e15c22a81e26..bec95c4494f7 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,6 +1,6 @@ root = true -[*.{css,html,js,json,latte,neon,php,twig,xml,yaml,yml}] +[*] charset = utf-8 end_of_line = lf insert_final_newline = true diff --git a/config/config.yaml b/config/config.yaml index 91a0aa9ae45c..561b954da393 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -9,9 +9,15 @@ imports: parameters: # processed paths paths: [] + file_extensions: + - 'php' + + # exclude exclude_paths: [] exclude_rectors: [] + autoload_paths: [] + rector_recipe: [] # this helps to separate opened 3rd party code vs private code approach (e.g. use of public constants) @@ -20,7 +26,7 @@ parameters: # lower for performance; higher to prevent bugs with fluent interfaces like https://github.com/rectorphp/rector/issues/1646, or https://github.com/rectorphp/rector/issues/2444 nested_chain_method_call_limit: 30 - # importing FQN names + # importing FQN names; false disables "import_short_classes" and "import_doc_blocks" options bellow auto_import_names: false # e.g. import \DateTime import_short_classes: true @@ -29,6 +35,3 @@ parameters: # what PHP version is used for features, composer.json version, then local PHP version is used by default php_version_features: null - - file_extensions: - - 'php' diff --git a/config/services.yaml b/config/services.yaml index 1c87c21cd880..d8bff01edd9c 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -9,7 +9,6 @@ services: - '../src/Rector/**/*Rector.php' - '../src/Testing/PHPUnit/*' - '../src/RectorDefinition/*' - - '../src/PhpParser/Node/*Info.php' - '../src/Exception/*' - '../src/DependencyInjection/CompilerPass/*' - '../src/DependencyInjection/Loader/*' diff --git a/ecs.yaml b/ecs.yaml index 667d981fa056..a8ca0c5c164a 100644 --- a/ecs.yaml +++ b/ecs.yaml @@ -98,8 +98,8 @@ parameters: # @todo split to multiple rectors - "rules/php-spec-to-phpunit/src/Rector/MethodCall/PhpSpecPromisesToPHPUnitAssertRector.php" - - "packages/better-php-doc-parser/src/PhpDocNode/Doctrine/Property_/ColumnTagValueNode.php" - - "packages/better-php-doc-parser/src/PhpDocNode/Doctrine/Property_/JoinColumnTagValueNode.php" + - 'packages/better-php-doc-parser/src/PhpDocNode/**/*TagValueNode.php' +# - "rules/coding-style/src/Rector/ClassMethod/NewlineBeforeNewAssignSetRector.php" # per node logic diff --git a/packages/better-php-doc-parser/src/PhpDocNode/AbstractTagValueNode.php b/packages/better-php-doc-parser/src/PhpDocNode/AbstractTagValueNode.php index ddcd0e4c2964..827f979c4d37 100644 --- a/packages/better-php-doc-parser/src/PhpDocNode/AbstractTagValueNode.php +++ b/packages/better-php-doc-parser/src/PhpDocNode/AbstractTagValueNode.php @@ -10,7 +10,7 @@ use Rector\BetterPhpDocParser\Attributes\Attribute\AttributeTrait; use Rector\BetterPhpDocParser\Contract\PhpDocNode\AttributeAwareNodeInterface; use Rector\BetterPhpDocParser\Contract\PhpDocNode\TagAwareNodeInterface; -use Rector\Core\BetterPhpDocParser\Utils\ArrayItemStaticHelper; +use Rector\BetterPhpDocParser\Utils\ArrayItemStaticHelper; abstract class AbstractTagValueNode implements AttributeAwareNodeInterface, PhpDocTagValueNode { diff --git a/packages/better-php-doc-parser/src/PhpDocNode/Gedmo/BlameableTagValueNode.php b/packages/better-php-doc-parser/src/PhpDocNode/Gedmo/BlameableTagValueNode.php index baaab898a35f..48800434c6d5 100644 --- a/packages/better-php-doc-parser/src/PhpDocNode/Gedmo/BlameableTagValueNode.php +++ b/packages/better-php-doc-parser/src/PhpDocNode/Gedmo/BlameableTagValueNode.php @@ -40,7 +40,7 @@ public function __toString(): string $contentItems = []; if ($this->on !== null) { - $contentItems['on'] = $this->on; + $contentItems['on'] = sprintf('on="%s"', $this->on); } if ($this->field) { diff --git a/packages/better-php-doc-parser/src/PhpDocNode/Gedmo/SlugTagValueNode.php b/packages/better-php-doc-parser/src/PhpDocNode/Gedmo/SlugTagValueNode.php index 979cbd66df2f..c88dee7260ff 100644 --- a/packages/better-php-doc-parser/src/PhpDocNode/Gedmo/SlugTagValueNode.php +++ b/packages/better-php-doc-parser/src/PhpDocNode/Gedmo/SlugTagValueNode.php @@ -4,6 +4,7 @@ namespace Rector\BetterPhpDocParser\PhpDocNode\Gedmo; +use Nette\Utils\Strings; use Rector\BetterPhpDocParser\Contract\PhpDocNode\ShortNameAwareTagInterface; use Rector\BetterPhpDocParser\PhpDocNode\AbstractTagValueNode; @@ -14,14 +15,130 @@ final class SlugTagValueNode extends AbstractTagValueNode implements ShortNameAw */ private $fields = []; - public function __construct(array $fields) - { + /** + * @var bool + */ + private $updatable = false; + + /** + * @var string + */ + private $style; + + /** + * @var bool + */ + private $unique = false; + + /** + * @var string|null + */ + private $uniqueBase; + + /** + * @var string + */ + private $separator; + + /** + * @var string + */ + private $prefix; + + /** + * @var string + */ + private $suffix; + + /** + * @var mixed[] + */ + private $handlers = []; + + /** + * @var string|null + */ + private $dateFormat; + + /** + * @var bool + */ + private $isFirstArgumentExplicit = true; + + public function __construct( + array $fields, + bool $updatable, + string $style, + bool $unique, + ?string $uniqueBase, + string $separator, + string $prefix, + string $suffix, + array $handlers, + ?string $dateFormat, + ?string $originalContent = null + ) { $this->fields = $fields; + $this->updatable = $updatable; + $this->style = $style; + $this->unique = $unique; + $this->uniqueBase = $uniqueBase; + $this->separator = $separator; + $this->prefix = $prefix; + $this->suffix = $suffix; + $this->handlers = $handlers; + + $this->resolveOriginalContentSpacingAndOrder($originalContent); + $this->dateFormat = $dateFormat; + + if ($originalContent !== null) { + + // @todo make generic to abstrat class + $this->isFirstArgumentExplicit = (bool) Strings::contains($originalContent, 'fields='); + } } public function __toString(): string { - return '(fields=' . $this->printArrayItem($this->fields) . ')'; + $contentItems['fields'] = $this->createFields(); + + if ($this->updatable) { + $contentItems['updatable'] = sprintf('updatable=%s', $this->updatable ? 'true' : 'false'); + } + + if ($this->style !== '') { + $contentItems['style'] = sprintf('style="%s"', $this->style); + } + + if ($this->unique) { + $contentItems['unique'] = sprintf('unique=%s', $this->unique ? 'true' : 'false'); + } + + if ($this->uniqueBase) { + $contentItems['unique_base'] = sprintf('unique_base="%s"', $this->uniqueBase); + } + + if ($this->separator !== '') { + $contentItems['separator'] = sprintf('separator="%s"', $this->separator); + } + + if ($this->prefix !== '') { + $contentItems['prefix'] = sprintf('prefix="%s"', $this->prefix); + } + + if ($this->suffix !== '') { + $contentItems['suffix'] = sprintf('suffix="%s"', $this->suffix); + } + + if ($this->dateFormat) { + $contentItems['dateFormat'] = sprintf('dateFormat="%s"', $this->dateFormat); + } + + if ($this->handlers !== []) { + $contentItems['handlers'] = $this->printArrayItem($this->handlers, 'handlers'); + } + + return $this->printContentItems($contentItems); } public function getFields(): array @@ -33,4 +150,13 @@ public function getShortName(): string { return '@Gedmo\Slug'; } + + private function createFields(): string + { + if ($this->isFirstArgumentExplicit) { + return sprintf('fields=%s', $this->printArrayItem($this->fields)); + } + + return $this->printArrayItem($this->fields); + } } diff --git a/packages/better-php-doc-parser/src/PhpDocNode/Symfony/SymfonyRouteTagValueNode.php b/packages/better-php-doc-parser/src/PhpDocNode/Symfony/SymfonyRouteTagValueNode.php index ba8f69a00676..d5434d10678d 100644 --- a/packages/better-php-doc-parser/src/PhpDocNode/Symfony/SymfonyRouteTagValueNode.php +++ b/packages/better-php-doc-parser/src/PhpDocNode/Symfony/SymfonyRouteTagValueNode.php @@ -98,6 +98,7 @@ public function __construct( // covers https://github.com/rectorphp/rector/issues/2994#issuecomment-598712339 + // @todo make generic to abstrat class if ($originalContent !== null) { $this->isPathExplicit = (bool) Strings::contains($originalContent, 'path='); diff --git a/packages/better-php-doc-parser/src/PhpDocNodeFactory/Gedmo/SlugPhpDocNodeFactory.php b/packages/better-php-doc-parser/src/PhpDocNodeFactory/Gedmo/SlugPhpDocNodeFactory.php index 6cfb44b4978b..3ed6610a2fdf 100644 --- a/packages/better-php-doc-parser/src/PhpDocNodeFactory/Gedmo/SlugPhpDocNodeFactory.php +++ b/packages/better-php-doc-parser/src/PhpDocNodeFactory/Gedmo/SlugPhpDocNodeFactory.php @@ -34,6 +34,20 @@ public function createFromNodeAndTokens(Node $node, TokenIterator $tokenIterator return null; } - return new SlugTagValueNode($slug->fields); + $annotationContent = $this->annotationContentResolver->resolveFromTokenIterator($tokenIterator); + + return new SlugTagValueNode( + $slug->fields, + $slug->updatable, + $slug->style, + $slug->unique, + $slug->unique_base, + $slug->separator, + $slug->prefix, + $slug->suffix, + $slug->handlers, + $slug->dateFormat, + $annotationContent + ); } } diff --git a/src/BetterPhpDocParser/Utils/ArrayItemStaticHelper.php b/packages/better-php-doc-parser/src/Utils/ArrayItemStaticHelper.php similarity index 97% rename from src/BetterPhpDocParser/Utils/ArrayItemStaticHelper.php rename to packages/better-php-doc-parser/src/Utils/ArrayItemStaticHelper.php index d39595c051d7..6e999535b014 100644 --- a/src/BetterPhpDocParser/Utils/ArrayItemStaticHelper.php +++ b/packages/better-php-doc-parser/src/Utils/ArrayItemStaticHelper.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Rector\Core\BetterPhpDocParser\Utils; +namespace Rector\BetterPhpDocParser\Utils; use Nette\Utils\Strings; diff --git a/packages/better-php-doc-parser/tests/PhpDocParser/AbstractPhpDocInfoTest.php b/packages/better-php-doc-parser/tests/PhpDocParser/AbstractPhpDocInfoTest.php new file mode 100644 index 000000000000..ee7e48c48a8d --- /dev/null +++ b/packages/better-php-doc-parser/tests/PhpDocParser/AbstractPhpDocInfoTest.php @@ -0,0 +1,112 @@ +bootKernel(RectorKernel::class); + + $this->fileInfoParser = self::$container->get(FileInfoParser::class); + + $this->betterNodeFinder = self::$container->get(BetterNodeFinder::class); + $this->phpDocInfoPrinter = self::$container->get(PhpDocInfoPrinter::class); + } + + /** + * @param class-string $nodeType + */ + protected function doTestPrintedPhpDocInfo(string $filePath, string $nodeType, string $tagValueNodeType): void + { + $this->ensureIsNodeType($nodeType); + + $nodeWithPhpDocInfo = $this->parseFileAndGetFirstNodeOfType($filePath, $nodeType); + + $docComment = $nodeWithPhpDocInfo->getDocComment(); + if ($docComment === null) { + throw new ShouldNotHappenException(sprintf('Doc comments for "%s" file cannot not be empty', $filePath)); + } + + $originalDocCommentText = $docComment->getText(); + $printedPhpDocInfo = $this->printNodePhpDocInfoToString($nodeWithPhpDocInfo); + + $this->assertSame($originalDocCommentText, $printedPhpDocInfo); + + $this->doTestContainsTagValueNodeType($nodeWithPhpDocInfo, $tagValueNodeType); + } + + protected function yieldFilesFromDirectory(string $directory, string $suffix = '*.php'): Iterator + { + return StaticFixtureProvider::yieldFilesFromDirectory($directory, $suffix); + } + + private function doTestContainsTagValueNodeType(Node $node, string $tagValueNodeType): void + { + /** @var PhpDocInfo $phpDocInfo */ + $phpDocInfo = $node->getAttribute(AttributeKey::PHP_DOC_INFO); + $phpDocInfo->hasByType($tagValueNodeType); + } + + /** + * @param class-string $nodeType + */ + private function parseFileAndGetFirstNodeOfType(string $filePath, string $nodeType): Node + { + $nodes = $this->fileInfoParser->parseFileInfoToNodesAndDecorate(new SmartFileInfo($filePath)); + + return $this->betterNodeFinder->findFirstInstanceOf($nodes, $nodeType); + } + + private function printNodePhpDocInfoToString(Node $node): string + { + $phpDocInfo = $node->getAttribute(AttributeKey::PHP_DOC_INFO); + if ($phpDocInfo === null) { + throw new ShouldNotHappenException(); + } + + return $this->phpDocInfoPrinter->printFormatPreserving($phpDocInfo); + } + + /** + * @param class-string $nodeType + */ + private function ensureIsNodeType(string $nodeType): void + { + if (is_a($nodeType, Node::class, true)) { + return; + } + + throw new ShouldNotHappenException(sprintf('"%s" must be type of "%s"', $nodeType, Node::class)); + } +} diff --git a/packages/better-php-doc-parser/tests/PhpDocParser/DoctrineOrmTagParser/DoctrineOrmTagNodeTest.php b/packages/better-php-doc-parser/tests/PhpDocParser/DoctrineOrmTagParser/DoctrineOrmTagNodeTest.php new file mode 100644 index 000000000000..acab14bfd1a0 --- /dev/null +++ b/packages/better-php-doc-parser/tests/PhpDocParser/DoctrineOrmTagParser/DoctrineOrmTagNodeTest.php @@ -0,0 +1,41 @@ +doTestPrintedPhpDocInfo($filePath, $nodeType, $expectedTagValueNodeType); + } + } + + public function provideData(): Iterator + { + yield [__DIR__ . '/Fixture/Property/Column', Property::class, ColumnTagValueNode::class]; + yield [__DIR__ . '/Fixture/Property/JoinTable', Property::class, JoinTableTagValueNode::class]; + + yield [__DIR__ . '/Fixture/Class_/Entity', Class_::class, EntityTagValueNode::class]; + yield [__DIR__ . '/Fixture/Class_/Table', Class_::class, TableTagValueNode::class]; + } +} diff --git a/packages/better-php-doc-parser/tests/PhpDocParser/OrmTagParser/Class_/Fixture/expected_formatting.txt b/packages/better-php-doc-parser/tests/PhpDocParser/DoctrineOrmTagParser/Fixture/Class_/Entity/FormattingDoctrineEntity.php similarity index 61% rename from packages/better-php-doc-parser/tests/PhpDocParser/OrmTagParser/Class_/Fixture/expected_formatting.txt rename to packages/better-php-doc-parser/tests/PhpDocParser/DoctrineOrmTagParser/Fixture/Class_/Entity/FormattingDoctrineEntity.php index 167b14c59a66..783ffc78fa72 100644 --- a/packages/better-php-doc-parser/tests/PhpDocParser/OrmTagParser/Class_/Fixture/expected_formatting.txt +++ b/packages/better-php-doc-parser/tests/PhpDocParser/DoctrineOrmTagParser/Fixture/Class_/Entity/FormattingDoctrineEntity.php @@ -1,3 +1,11 @@ +doTestPrintedPhpDocInfo($filePath, Property::class, BlameableTagValueNode::class); + } + + public function provideDataForBlameable(): Iterator + { + return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture/Blameable'); + } + + /** + * @dataProvider provideDataForBlameable() + */ + public function testSlug(string $filePath): void + { + $this->doTestPrintedPhpDocInfo($filePath, Property::class, SlugTagValueNode::class); + } + + public function provideDataForSlug(): Iterator + { + return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture/Slug'); + } +} diff --git a/packages/better-php-doc-parser/tests/PhpDocParser/OrmTagParser/AbstractPhpDocInfoTest.php b/packages/better-php-doc-parser/tests/PhpDocParser/OrmTagParser/AbstractPhpDocInfoTest.php deleted file mode 100644 index d5678628122d..000000000000 --- a/packages/better-php-doc-parser/tests/PhpDocParser/OrmTagParser/AbstractPhpDocInfoTest.php +++ /dev/null @@ -1,60 +0,0 @@ -bootKernel(RectorKernel::class); - - $this->fileInfoParser = self::$container->get(FileInfoParser::class); - - $this->betterNodeFinder = self::$container->get(BetterNodeFinder::class); - $this->phpDocInfoPrinter = self::$container->get(PhpDocInfoPrinter::class); - } - - protected function parseFileAndGetFirstNodeOfType(string $filePath, string $type): Node - { - $nodes = $this->fileInfoParser->parseFileInfoToNodesAndDecorate(new SmartFileInfo($filePath)); - - return $this->betterNodeFinder->findFirstInstanceOf($nodes, $type); - } - - protected function printNodePhpDocInfoToString(Node $node): string - { - $phpDocInfo = $node->getAttribute(AttributeKey::PHP_DOC_INFO); - if ($phpDocInfo === null) { - throw new ShouldNotHappenException(); - } - - return $this->phpDocInfoPrinter->printFormatPreserving($phpDocInfo); - } -} diff --git a/packages/better-php-doc-parser/tests/PhpDocParser/OrmTagParser/Class_/Fixture/SkipNonDoctrineEntity.php b/packages/better-php-doc-parser/tests/PhpDocParser/OrmTagParser/Class_/Fixture/SkipNonDoctrineEntity.php deleted file mode 100644 index 712e280f23e0..000000000000 --- a/packages/better-php-doc-parser/tests/PhpDocParser/OrmTagParser/Class_/Fixture/SkipNonDoctrineEntity.php +++ /dev/null @@ -1,17 +0,0 @@ -parseFileAndGetFirstNodeOfType($filePath, $type); - $printedPhpDocInfo = $this->printNodePhpDocInfoToString($class); - - $this->assertStringEqualsFile($expectedPrintedPhpDoc, $printedPhpDocInfo); - } - - public function provideData(): Iterator - { - yield [__DIR__ . '/Fixture/SomeEntity.php', __DIR__ . '/Fixture/expected_some_entity.txt', Class_::class]; - - yield [ - __DIR__ . '/Fixture/SomeEntitySimple.php', - __DIR__ . '/Fixture/expected_some_entity_simple.txt', - Class_::class, - ]; - - yield [ - __DIR__ . '/Fixture/SkipNonDoctrineEntity.php', - __DIR__ . '/Fixture/expected_skip_non_doctrine_entity.txt', - ClassMethod::class, - ]; - - yield [ - __DIR__ . '/Fixture/TableWithIndexes.php', - __DIR__ . '/Fixture/expected_table_with_indexes.txt', - Class_::class, - ]; - - yield [ - __DIR__ . '/Fixture/FormattingDoctrineEntity.php', - __DIR__ . '/Fixture/expected_formatting.txt', - Class_::class, - ]; - } -} diff --git a/packages/better-php-doc-parser/tests/PhpDocParser/OrmTagParser/Class_/Source/ExistingRepositoryClass.php b/packages/better-php-doc-parser/tests/PhpDocParser/OrmTagParser/Class_/Source/ExistingRepositoryClass.php deleted file mode 100644 index d70a83d2d847..000000000000 --- a/packages/better-php-doc-parser/tests/PhpDocParser/OrmTagParser/Class_/Source/ExistingRepositoryClass.php +++ /dev/null @@ -1,10 +0,0 @@ -parseFileAndGetFirstNodeOfType($filePath, Property::class); - $printedPhpDocInfo = $this->printNodePhpDocInfoToString($property); - - $this->assertStringEqualsFile($expectedPrintedPhpDoc, $printedPhpDocInfo); - } - - public function provideData(): Iterator - { - yield [__DIR__ . '/Fixture/SomeProperty.php', __DIR__ . '/Fixture/expected_some_property.txt']; - - yield [__DIR__ . '/Fixture/PropertyWithName.php', __DIR__ . '/Fixture/expected_property_with_name.txt']; - - yield [__DIR__ . '/Fixture/FromOfficialDocs.php', __DIR__ . '/Fixture/expected_from_official_docs.txt']; - - yield [__DIR__ . '/Fixture/JoinTable.php', __DIR__ . '/Fixture/expected_join_table.txt']; - } -} diff --git a/packages/better-php-doc-parser/tests/PhpDocParser/SymfonyRouteTagParser/Source/RouteWithHost.php b/packages/better-php-doc-parser/tests/PhpDocParser/SymfonyRouteTagParser/Fixture/RouteWithHost.php similarity index 93% rename from packages/better-php-doc-parser/tests/PhpDocParser/SymfonyRouteTagParser/Source/RouteWithHost.php rename to packages/better-php-doc-parser/tests/PhpDocParser/SymfonyRouteTagParser/Fixture/RouteWithHost.php index 36b48d1bc694..763f5a63c186 100644 --- a/packages/better-php-doc-parser/tests/PhpDocParser/SymfonyRouteTagParser/Source/RouteWithHost.php +++ b/packages/better-php-doc-parser/tests/PhpDocParser/SymfonyRouteTagParser/Fixture/RouteWithHost.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Rector\BetterPhpDocParser\Tests\PhpDocParser\SymfonyRouteTagParser\Source; +namespace Rector\BetterPhpDocParser\Tests\PhpDocParser\SymfonyRouteTagParser\Fixture; use Symfony\Component\Routing\Annotation\Route; diff --git a/packages/better-php-doc-parser/tests/PhpDocParser/SymfonyRouteTagParser/Fixture/RouteWithHostWithPath.php b/packages/better-php-doc-parser/tests/PhpDocParser/SymfonyRouteTagParser/Fixture/RouteWithHostWithPath.php new file mode 100644 index 000000000000..2ad9e21fa283 --- /dev/null +++ b/packages/better-php-doc-parser/tests/PhpDocParser/SymfonyRouteTagParser/Fixture/RouteWithHostWithPath.php @@ -0,0 +1,17 @@ +parseFileAndGetFirstNodeOfType($filePath, ClassMethod::class); - - $printedPhpDocInfo = $this->printNodePhpDocInfoToString($classMethod); - - $this->assertStringEqualsFile($expectedPrintedPhpDoc, $printedPhpDocInfo); + $this->doTestPrintedPhpDocInfo($filePath, ClassMethod::class, SymfonyRouteTagValueNode::class); } public function provideData(): Iterator { - yield [__DIR__ . '/Source/SomeClassMethod.php', __DIR__ . '/Fixture/expected_some_class_method.txt']; - - yield [__DIR__ . '/Source/RouteWithHost.php', __DIR__ . '/Fixture/expected_route_with_host.txt']; + return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } } diff --git a/phpstan.neon b/phpstan.neon index 07a2216361c4..8c1e95d864ff 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -145,7 +145,7 @@ parameters: # bugs - '#Parameter \#1 \$items of class PhpParser\\Node\\Expr\\Array_ constructor expects array, array given#' - - '#Method Rector\\BetterPhpDocParser\\Tests\\PhpDocParser\\OrmTagParser\\AbstractPhpDocInfoTest\:\:parseFileAndGetFirstNodeOfType\(\) should return PhpParser\\Node but returns PhpParser\\Node\|null#' + - '#Method Rector\\BetterPhpDocParser\\Tests\\PhpDocParser\\AbstractPhpDocInfoTest\:\:parseFileAndGetFirstNodeOfType\(\) should return PhpParser\\Node but returns PhpParser\\Node\|null#' - '#Method Rector\\BetterPhpDocParser\\PhpDocNodeFactory\\JMS\\SerializerTypePhpDocNodeFactory::resolveTypeAnnotation\(\) should return JMS\\Serializer\\Annotation\\Type\|null but returns object\|null#' diff --git a/rules/nette-to-symfony/tests/Rector/ClassMethod/RouterListToControllerAnnotationsRetor/Source/SymfonyRouteAnnotation.php b/rules/nette-to-symfony/tests/Rector/ClassMethod/RouterListToControllerAnnotationsRetor/Source/SymfonyRouteAnnotation.php deleted file mode 100644 index 1c821f6ecb9a..000000000000 --- a/rules/nette-to-symfony/tests/Rector/ClassMethod/RouterListToControllerAnnotationsRetor/Source/SymfonyRouteAnnotation.php +++ /dev/null @@ -1,9 +0,0 @@ -getPathName(); + } + } + /** * @return SplFileInfo[] */