From e9ba820fa4c93353c32dad669381f12c1b3eede5 Mon Sep 17 00:00:00 2001 From: TomasVotruba Date: Wed, 13 May 2020 17:41:57 +0200 Subject: [PATCH] [Shopware] Deprecate single custom rule, better handled by community --- composer.json | 2 - config/set/shopware/shopware55.yaml | 2 - config/set/shopware/shopware56.yaml | 5 - docs/rector_rules_overview.md | 66 +------ .../ShopwareVersionConstsRector.php | 93 ---------- ...lightResponseWithSymfonyResponseRector.php | 169 ------------------ .../ShopRegistrationServiceRector.php | 82 --------- .../Fixture/fixture.php.inc | 27 --- .../ShopwareVersionConstsRectorTest.php | 30 ---- .../Fixture/fixture.php.inc | 55 ------ ...tResponseWithSymfonyResponseRectorTest.php | 30 ---- .../Fixture/fixture.php.inc | 29 --- .../ShopRegistrationServiceRectorTest.php | 30 ---- sonar-project.properties | 4 +- 14 files changed, 3 insertions(+), 621 deletions(-) delete mode 100644 rules/shopware/src/Rector/ClassConstFetch/ShopwareVersionConstsRector.php delete mode 100644 rules/shopware/src/Rector/MethodCall/ReplaceEnlightResponseWithSymfonyResponseRector.php delete mode 100644 rules/shopware/src/Rector/MethodCall/ShopRegistrationServiceRector.php delete mode 100644 rules/shopware/tests/Rector/ClassConstFetch/ShopwareVersionConstsRector/Fixture/fixture.php.inc delete mode 100644 rules/shopware/tests/Rector/ClassConstFetch/ShopwareVersionConstsRector/ShopwareVersionConstsRectorTest.php delete mode 100644 rules/shopware/tests/Rector/MethodCall/ReplaceEnlightResponseWithSymfonyResponseRector/Fixture/fixture.php.inc delete mode 100644 rules/shopware/tests/Rector/MethodCall/ReplaceEnlightResponseWithSymfonyResponseRector/ReplaceEnlightResponseWithSymfonyResponseRectorTest.php delete mode 100644 rules/shopware/tests/Rector/MethodCall/ShopRegistrationServiceRector/Fixture/fixture.php.inc delete mode 100644 rules/shopware/tests/Rector/MethodCall/ShopRegistrationServiceRector/ShopRegistrationServiceRectorTest.php diff --git a/composer.json b/composer.json index 6cab7b656172..c32ae5e33dcc 100644 --- a/composer.json +++ b/composer.json @@ -122,7 +122,6 @@ "Rector\\SOLID\\": "rules/solid/src", "Rector\\NodeNestingScope\\": "packages/node-nesting-scope/src", "Rector\\Sensio\\": "rules/sensio/src", - "Rector\\Shopware\\": "rules/shopware/src", "Rector\\StaticTypeMapper\\": "packages/static-type-mapper/src", "Rector\\StrictCodeQuality\\": "rules/strict-code-quality/src", "Rector\\SymfonyCodeQuality\\": "rules/symfony-code-quality/src", @@ -191,7 +190,6 @@ "Rector\\Restoration\\Tests\\": "rules/restoration/tests", "Rector\\SOLID\\Tests\\": "rules/solid/tests", "Rector\\Sensio\\Tests\\": "rules/sensio/tests", - "Rector\\Shopware\\Tests\\": "rules/shopware/tests", "Rector\\StrictCodeQuality\\Tests\\": "rules/strict-code-quality/tests", "Rector\\SymfonyCodeQuality\\Tests\\": "rules/symfony-code-quality/tests", "Rector\\SymfonyPHPUnit\\Tests\\": "rules/symfony-phpunit/tests", diff --git a/config/set/shopware/shopware55.yaml b/config/set/shopware/shopware55.yaml index d979928bcaa4..8bca0a71177f 100644 --- a/config/set/shopware/shopware55.yaml +++ b/config/set/shopware/shopware55.yaml @@ -20,5 +20,3 @@ services: Shopware_Components_Config: isset: 'offsetExists' unset: 'offsetUnset' - - Rector\Shopware\Rector\ClassConstFetch\ShopwareVersionConstsRector: null diff --git a/config/set/shopware/shopware56.yaml b/config/set/shopware/shopware56.yaml index 52fe4e49f4c6..348b90869161 100644 --- a/config/set/shopware/shopware56.yaml +++ b/config/set/shopware/shopware56.yaml @@ -4,8 +4,6 @@ imports: - { resource: '../elasticsearch-dsl/elasticsearch-dsl50.yaml' } services: - Rector\Shopware\Rector\MethodCall\ReplaceEnlightResponseWithSymfonyResponseRector: null - Rector\Renaming\Rector\MethodCall\RenameMethodCallRector: $oldToNewMethodsByClass: Enlight_Controller_Response_Response: @@ -13,6 +11,3 @@ services: setHttpResponseCode: setStatusCode sendCookies: sendHeaders setBody: setContent - - Rector\Shopware\Rector\ClassConstFetch\ShopwareVersionConstsRector: null - Rector\Shopware\Rector\MethodCall\ShopRegistrationServiceRector: null diff --git a/docs/rector_rules_overview.md b/docs/rector_rules_overview.md index ccd972ef5e88..e7f20fd7042e 100644 --- a/docs/rector_rules_overview.md +++ b/docs/rector_rules_overview.md @@ -1,4 +1,4 @@ -# All 487 Rectors Overview +# All 484 Rectors Overview - [Projects](#projects) - [General](#general) @@ -58,7 +58,6 @@ - [Restoration](#restoration) (3) - [SOLID](#solid) (11) - [Sensio](#sensio) (1) -- [Shopware](#shopware) (3) - [StrictCodeQuality](#strictcodequality) (1) - [Symfony](#symfony) (29) - [SymfonyCodeQuality](#symfonycodequality) (1) @@ -9217,69 +9216,6 @@ Turns `@Template` annotation to explicit method call in Controller of FrameworkE
-## Shopware - -### `ReplaceEnlightResponseWithSymfonyResponseRector` - -- class: [`Rector\Shopware\Rector\MethodCall\ReplaceEnlightResponseWithSymfonyResponseRector`](/../master/rules/shopware/src/Rector/MethodCall/ReplaceEnlightResponseWithSymfonyResponseRector.php) -- [test fixtures](/../master/rules/shopware/tests/Rector/MethodCall/ReplaceEnlightResponseWithSymfonyResponseRector/Fixture) - -Replace Enlight Response methods with Symfony Response methods - -```diff - class FrontendController extends \Enlight_Controller_Action - { - public function run() - { -- $this->Response()->setHeader('Foo', 'Yea'); -+ $this->Response()->headers->set('Foo', 'Yea'); - } - } -``` - -
- -### `ShopRegistrationServiceRector` - -- class: [`Rector\Shopware\Rector\MethodCall\ShopRegistrationServiceRector`](/../master/rules/shopware/src/Rector/MethodCall/ShopRegistrationServiceRector.php) -- [test fixtures](/../master/rules/shopware/tests/Rector/MethodCall/ShopRegistrationServiceRector/Fixture) - -Replace $shop->registerResources() with ShopRegistrationService - -```diff - class SomeClass - { - public function run() - { - $shop = new \Shopware\Models\Shop\Shop(); -- $shop->registerResources(); -+ Shopware()->Container()->get('shopware.components.shop_registration_service')->registerShop($shop); - } - } -``` - -
- -### `ShopwareVersionConstsRector` - -- class: [`Rector\Shopware\Rector\ClassConstFetch\ShopwareVersionConstsRector`](/../master/rules/shopware/src/Rector/ClassConstFetch/ShopwareVersionConstsRector.php) -- [test fixtures](/../master/rules/shopware/tests/Rector/ClassConstFetch/ShopwareVersionConstsRector/Fixture) - -Use version from di parameter - -```diff - class SomeClass - { - public function run() - { -- echo \Shopware::VERSION; -+ echo Shopware()->Container()->getParameter('shopware.release.version'); - } - } -``` - -
- ## StrictCodeQuality ### `VarInlineAnnotationToAssertRector` diff --git a/rules/shopware/src/Rector/ClassConstFetch/ShopwareVersionConstsRector.php b/rules/shopware/src/Rector/ClassConstFetch/ShopwareVersionConstsRector.php deleted file mode 100644 index 83aa4327ebf8..000000000000 --- a/rules/shopware/src/Rector/ClassConstFetch/ShopwareVersionConstsRector.php +++ /dev/null @@ -1,93 +0,0 @@ -Container()->getParameter('shopware.release.version'); - } -} -PHP - ), - ]); - } - - /** - * @return string[] - */ - public function getNodeTypes(): array - { - return [ClassConstFetch::class]; - } - - /** - * @param ClassConstFetch $node - */ - public function refactor(Node $node): ?Node - { - if (! $this->isObjectType($node, 'Shopware')) { - return null; - } - - if (! $node->name instanceof Identifier) { - return null; - } - - switch ($node->name->name) { - case 'VERSION': - return $this->buildParameterCall('shopware.release.version'); - case 'VERSION_TEXT': - return $this->buildParameterCall('shopware.release.version_text'); - case 'REVISION': - return $this->buildParameterCall('shopware.release.revision'); - default: - return null; - } - } - - private function buildParameterCall(string $paramterName): MethodCall - { - $shopwareFunction = new FuncCall(new Name('Shopware')); - $containerCall = new MethodCall($shopwareFunction, new Identifier('Container')); - return new MethodCall($containerCall, new Identifier('getParameter'), [ - new Arg(new String_($paramterName)), - ]); - } -} diff --git a/rules/shopware/src/Rector/MethodCall/ReplaceEnlightResponseWithSymfonyResponseRector.php b/rules/shopware/src/Rector/MethodCall/ReplaceEnlightResponseWithSymfonyResponseRector.php deleted file mode 100644 index a984046e7ef6..000000000000 --- a/rules/shopware/src/Rector/MethodCall/ReplaceEnlightResponseWithSymfonyResponseRector.php +++ /dev/null @@ -1,169 +0,0 @@ -Response()->setHeader('Foo', 'Yea'); - } -} -PHP - , - <<<'PHP' -class FrontendController extends \Enlight_Controller_Action -{ - public function run() - { - $this->Response()->headers->set('Foo', 'Yea'); - } -} -PHP - ), - ]); - } - - /** - * @return string[] - */ - public function getNodeTypes(): array - { - return [MethodCall::class]; - } - - /** - * @param MethodCall $node - */ - public function refactor(Node $node): ?Node - { - if (! $this->isObjectType($node, 'Enlight_Controller_Response_Response')) { - return null; - } - - $name = $this->getName($node->name); - - switch ($name) { - case 'setHeader': - return $this->modifySetHeader($node); - case 'clearHeader': - return $this->modifyHeader($node, 'remove'); - case 'clearAllHeaders': - case 'clearRawHeaders': - return $this->modifyHeader($node, 'replace'); - case 'removeCookie': - return $this->modifyHeader($node, 'removeCookie'); - case 'setRawHeader': - return $this->modifyRawHeader($node, 'set'); - case 'clearRawHeader': - return $this->modifyRawHeader($node, 'remove'); - case 'setCookie': - return $this->modifySetCookie($node); - - default: - return null; - } - } - - private function modifySetHeader(MethodCall $methodCall): MethodCall - { - $methodCall->var = new PropertyFetch($methodCall->var, self::HEADERS); - $methodCall->name = new Identifier('set'); - - if (! $methodCall->args[0]->value instanceof String_) { - return $methodCall; - } - - /** @var String_ $arg1 */ - $arg1 = $methodCall->args[0]->value; - $arg1->value = strtolower($arg1->value); - - // We have a cache-control call without replace header (3rd argument) - if ($arg1->value === 'cache-control' && ! isset($methodCall->args[2])) { - $methodCall->args[2] = new Arg(new ConstFetch(new Name(['true']))); - } - - return $methodCall; - } - - private function modifyHeader(MethodCall $methodCall, string $newMethodName): MethodCall - { - $methodCall->var = new PropertyFetch($methodCall->var, self::HEADERS); - $methodCall->name = new Identifier($newMethodName); - - return $methodCall; - } - - private function modifyRawHeader(MethodCall $methodCall, string $newMethodName): MethodCall - { - $methodCall->var = new PropertyFetch($methodCall->var, self::HEADERS); - $methodCall->name = new Identifier($newMethodName); - - if ($methodCall->args[0]->value instanceof String_) { - $parts = $this->getRawHeaderParts($methodCall->args[0]->value->value); - - $args = []; - foreach ($parts as $i => $part) { - if ($i === 0) { - $part = strtolower($part); - } - - $args[] = new Arg(new String_($part)); - } - - $methodCall->args = $args; - } - - return $methodCall; - } - - private function modifySetCookie(MethodCall $methodCall): MethodCall - { - $methodCall->var = new PropertyFetch($methodCall->var, self::HEADERS); - $methodCall->name = new Identifier('setCookie'); - - $new = new New_(new FullyQualified('Symfony\Component\HttpFoundation\Cookie'), $methodCall->args); - $methodCall->args = [new Arg($new)]; - - return $methodCall; - } - - /** - * @return string[] - */ - private function getRawHeaderParts(string $name): array - { - return array_map('trim', explode(':', $name, 2)); - } -} diff --git a/rules/shopware/src/Rector/MethodCall/ShopRegistrationServiceRector.php b/rules/shopware/src/Rector/MethodCall/ShopRegistrationServiceRector.php deleted file mode 100644 index e4b1bcb93f6b..000000000000 --- a/rules/shopware/src/Rector/MethodCall/ShopRegistrationServiceRector.php +++ /dev/null @@ -1,82 +0,0 @@ -registerResources() with ShopRegistrationService', [ - new CodeSample( - <<<'PHP' -class SomeClass -{ - public function run() - { - $shop = new \Shopware\Models\Shop\Shop(); - $shop->registerResources(); - } -} -PHP - , - <<<'PHP' -class SomeClass -{ - public function run() - { - $shop = new \Shopware\Models\Shop\Shop(); - Shopware()->Container()->get('shopware.components.shop_registration_service')->registerShop($shop); - } -} -PHP - ), - ]); - } - - /** - * @return string[] - */ - public function getNodeTypes(): array - { - return [MethodCall::class]; - } - - /** - * @param MethodCall $node - */ - public function refactor(Node $node): ?Node - { - if (! $this->isName($node->name, 'registerResources')) { - return null; - } - - if (! $this->isObjectType($node, 'Shopware\Models\Shop\Shop')) { - return null; - } - - $shopwareFunction = new FuncCall(new Name('Shopware')); - $containerCall = new MethodCall($shopwareFunction, new Identifier('Container')); - $methodCall = new MethodCall($containerCall, new Identifier('get'), [ - new Arg(new String_('shopware.components.shop_registration_service')), - ]); - - return new MethodCall($methodCall, new Identifier('registerShop'), [new Arg($node->var)]); - } -} diff --git a/rules/shopware/tests/Rector/ClassConstFetch/ShopwareVersionConstsRector/Fixture/fixture.php.inc b/rules/shopware/tests/Rector/ClassConstFetch/ShopwareVersionConstsRector/Fixture/fixture.php.inc deleted file mode 100644 index f9dc526c3080..000000000000 --- a/rules/shopware/tests/Rector/ClassConstFetch/ShopwareVersionConstsRector/Fixture/fixture.php.inc +++ /dev/null @@ -1,27 +0,0 @@ - ------ -Container()->getParameter('shopware.release.version'); - } -} - -?> diff --git a/rules/shopware/tests/Rector/ClassConstFetch/ShopwareVersionConstsRector/ShopwareVersionConstsRectorTest.php b/rules/shopware/tests/Rector/ClassConstFetch/ShopwareVersionConstsRector/ShopwareVersionConstsRectorTest.php deleted file mode 100644 index 45294a53191c..000000000000 --- a/rules/shopware/tests/Rector/ClassConstFetch/ShopwareVersionConstsRector/ShopwareVersionConstsRectorTest.php +++ /dev/null @@ -1,30 +0,0 @@ -doTestFile($file); - } - - public function provideData(): Iterator - { - return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); - } - - protected function getRectorClass(): string - { - return ShopwareVersionConstsRector::class; - } -} diff --git a/rules/shopware/tests/Rector/MethodCall/ReplaceEnlightResponseWithSymfonyResponseRector/Fixture/fixture.php.inc b/rules/shopware/tests/Rector/MethodCall/ReplaceEnlightResponseWithSymfonyResponseRector/Fixture/fixture.php.inc deleted file mode 100644 index 662e709203bc..000000000000 --- a/rules/shopware/tests/Rector/MethodCall/ReplaceEnlightResponseWithSymfonyResponseRector/Fixture/fixture.php.inc +++ /dev/null @@ -1,55 +0,0 @@ -Response()->setHeader('Foo', 'Yea'); - $this->Response()->setHeader('Cache-Control', 'Yea'); - $this->Response()->removeCookie('fooo'); - $this->Response()->setRawHeader('Foo: 1'); - $this->Response()->clearRawHeader('Foo'); - $this->Response()->clearAllHeaders(); - $this->Response()->clearRawHeaders(); - $this->Response()->setCookie('Foo', 1); - } - - /** - * @return \Enlight_Controller_Response_Response - */ - public function Response() - { - } -} - -?> ------ -Response()->headers->set('foo', 'Yea'); - $this->Response()->headers->set('cache-control', 'Yea', true); - $this->Response()->headers->removeCookie('fooo'); - $this->Response()->headers->set('foo', '1'); - $this->Response()->headers->remove('foo'); - $this->Response()->headers->replace(); - $this->Response()->headers->replace(); - $this->Response()->headers->setCookie(new \Symfony\Component\HttpFoundation\Cookie('Foo', 1)); - } - - /** - * @return \Enlight_Controller_Response_Response - */ - public function Response() - { - } -} - -?> diff --git a/rules/shopware/tests/Rector/MethodCall/ReplaceEnlightResponseWithSymfonyResponseRector/ReplaceEnlightResponseWithSymfonyResponseRectorTest.php b/rules/shopware/tests/Rector/MethodCall/ReplaceEnlightResponseWithSymfonyResponseRector/ReplaceEnlightResponseWithSymfonyResponseRectorTest.php deleted file mode 100644 index 2b67c1f29192..000000000000 --- a/rules/shopware/tests/Rector/MethodCall/ReplaceEnlightResponseWithSymfonyResponseRector/ReplaceEnlightResponseWithSymfonyResponseRectorTest.php +++ /dev/null @@ -1,30 +0,0 @@ -doTestFile($file); - } - - public function provideData(): Iterator - { - return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); - } - - protected function getRectorClass(): string - { - return ReplaceEnlightResponseWithSymfonyResponseRector::class; - } -} diff --git a/rules/shopware/tests/Rector/MethodCall/ShopRegistrationServiceRector/Fixture/fixture.php.inc b/rules/shopware/tests/Rector/MethodCall/ShopRegistrationServiceRector/Fixture/fixture.php.inc deleted file mode 100644 index dc953839759e..000000000000 --- a/rules/shopware/tests/Rector/MethodCall/ShopRegistrationServiceRector/Fixture/fixture.php.inc +++ /dev/null @@ -1,29 +0,0 @@ -registerResources(); - } -} - -?> ------ -Container()->get('shopware.components.shop_registration_service')->registerShop($shop); - } -} - -?> diff --git a/rules/shopware/tests/Rector/MethodCall/ShopRegistrationServiceRector/ShopRegistrationServiceRectorTest.php b/rules/shopware/tests/Rector/MethodCall/ShopRegistrationServiceRector/ShopRegistrationServiceRectorTest.php deleted file mode 100644 index 4558e7df4f13..000000000000 --- a/rules/shopware/tests/Rector/MethodCall/ShopRegistrationServiceRector/ShopRegistrationServiceRectorTest.php +++ /dev/null @@ -1,30 +0,0 @@ -doTestFile($file); - } - - public function provideData(): Iterator - { - return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); - } - - protected function getRectorClass(): string - { - return ShopRegistrationServiceRector::class; - } -} diff --git a/sonar-project.properties b/sonar-project.properties index b15235c76e29..1bc9be58d96d 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -4,9 +4,9 @@ sonar.projectKey=rectorphp_rector # relative paths to source # wildcards don't work :( -sonar.sources=compiler/src,src,rules/autodiscovery/src,rules/architecture/src,packages/attribute-aware-php-doc/src,packages/better-php-doc-parser/src,rules/cakephp/src,rules/celebrity/src,rules/code-quality/src,rules/coding-style/src,packages/console-differ/src,rules/dead-code/src,rules/doctrine/src,rules/doctrine-code-quality/src,rules/framework-migration/src,packages/file-system-rector/src,rules/elastic-search-dsl/src,rules/guzzle/src,rules/laravel/src,rules/legacy/src,rules/mysql-to-mysqli/src,rules/nette-tester-to-phpunit/src,rules/nette-to-symfony/src,rules/nette/src,packages/node-collector/src,packages/node-type-resolver/src,packages/node-name-resolver/src,rules/phpstan/src,packages/phpstan-static-type-mapper/src,rules/phpunit-symfony/src,rules/phpunit/src,rules/psr4/src,rules/php-spec-to-phpunit/src,rules/php52/src,rules/php53/src,rules/php54/src,rules/php55/src,rules/php56/src,rules/php70/src,rules/php71/src,rules/php72/src,rules/php73/src,rules/php74/src,rules/php80/src,rules/removing-static/src,rules/renaming/src,rules/restoration/src,packages/refactoring/src,rules/solid/src,rules/sensio/src,rules/shopware/src,packages/static-type-mapper/src,rules/symfony-code-quality/src,rules/symfony-phpunit/src,rules/symfony/src,rules/twig/src,rules/type-declaration/src,packages/vendor-locker/src,packages/rector-generator/src,rules/strict-code-quality/src,packages/dynamic-type-analysis/src,rules/php-deglobalize/src,rules/phalcon/src,rules/doctrine-gedmo-to-knplabs/src,packages/polyfill/src +sonar.sources=compiler/src,src,rules/autodiscovery/src,rules/architecture/src,packages/attribute-aware-php-doc/src,packages/better-php-doc-parser/src,rules/cakephp/src,rules/celebrity/src,rules/code-quality/src,rules/coding-style/src,packages/console-differ/src,rules/dead-code/src,rules/doctrine/src,rules/doctrine-code-quality/src,rules/framework-migration/src,packages/file-system-rector/src,rules/elastic-search-dsl/src,rules/guzzle/src,rules/laravel/src,rules/legacy/src,rules/mysql-to-mysqli/src,rules/nette-tester-to-phpunit/src,rules/nette-to-symfony/src,rules/nette/src,packages/node-collector/src,packages/node-type-resolver/src,packages/node-name-resolver/src,rules/phpstan/src,packages/phpstan-static-type-mapper/src,rules/phpunit-symfony/src,rules/phpunit/src,rules/psr4/src,rules/php-spec-to-phpunit/src,rules/php52/src,rules/php53/src,rules/php54/src,rules/php55/src,rules/php56/src,rules/php70/src,rules/php71/src,rules/php72/src,rules/php73/src,rules/php74/src,rules/php80/src,rules/removing-static/src,rules/renaming/src,rules/restoration/src,packages/refactoring/src,rules/solid/src,rules/sensio/src,packages/static-type-mapper/src,rules/symfony-code-quality/src,rules/symfony-phpunit/src,rules/symfony/src,rules/twig/src,rules/type-declaration/src,packages/vendor-locker/src,packages/rector-generator/src,rules/strict-code-quality/src,packages/dynamic-type-analysis/src,rules/php-deglobalize/src,rules/phalcon/src,rules/doctrine-gedmo-to-knplabs/src,packages/polyfill/src -sonar.tests=tests,rules/autodiscovery/tests,rules/architecture/tests,packages/better-php-doc-parser/tests,rules/cakephp/tests,rules/celebrity/tests,rules/code-quality/tests,rules/coding-style/tests,rules/dead-code/tests,rules/doctrine/tests,rules/doctrine-code-quality/tests,rules/elastic-search-dsl/tests,rules/guzzle/tests,rules/laravel/tests,rules/legacy/tests,rules/mysql-to-mysqli/tests,rules/nette-tester-to-phpunit/tests,rules/nette-to-symfony/tests,rules/nette/tests,packages/node-type-resolver/tests,utils/phpstan-extensions/src,rules/phpstan/tests,rules/phpunit-symfony/tests,rules/phpunit/tests,rules/psr4/tests,rules/php-spec-to-phpunit/tests,rules/php52/tests,rules/php53/tests,rules/php54/tests,rules/php55/tests,rules/php56/tests,rules/php70/tests,rules/php71/tests,rules/php72/tests,rules/php73/tests,rules/php74/tests,rules/php80/tests,rules/removing-static/tests,rules/renaming/tests,rules/restoration/tests,rules/solid/tests,rules/sensio/tests,rules/shopware/tests,rules/symfony-code-quality/tests,rules/symfony-phpunit/tests,rules/symfony/tests,rules/twig/tests,rules/type-declaration/tests,rules/strict-code-quality/tests,packages/dynamic-type-analysis/tests,rules/php-deglobalize/tests,rules/phalcon/tests,utils/documentation-generator/src,utils/phpstan-attribute-type-syncer/src,utils/phpstan-static-type-mapper-checker/src,rules/doctrine-gedmo-to-knplabs/tests,packages/polyfill/tests +sonar.tests=tests,rules/autodiscovery/tests,rules/architecture/tests,packages/better-php-doc-parser/tests,rules/cakephp/tests,rules/celebrity/tests,rules/code-quality/tests,rules/coding-style/tests,rules/dead-code/tests,rules/doctrine/tests,rules/doctrine-code-quality/tests,rules/elastic-search-dsl/tests,rules/guzzle/tests,rules/laravel/tests,rules/legacy/tests,rules/mysql-to-mysqli/tests,rules/nette-tester-to-phpunit/tests,rules/nette-to-symfony/tests,rules/nette/tests,packages/node-type-resolver/tests,utils/phpstan-extensions/src,rules/phpstan/tests,rules/phpunit-symfony/tests,rules/phpunit/tests,rules/psr4/tests,rules/php-spec-to-phpunit/tests,rules/php52/tests,rules/php53/tests,rules/php54/tests,rules/php55/tests,rules/php56/tests,rules/php70/tests,rules/php71/tests,rules/php72/tests,rules/php73/tests,rules/php74/tests,rules/php80/tests,rules/removing-static/tests,rules/renaming/tests,rules/restoration/tests,rules/solid/tests,rules/sensio/tests,rules/symfony-code-quality/tests,rules/symfony-phpunit/tests,rules/symfony/tests,rules/twig/tests,rules/type-declaration/tests,rules/strict-code-quality/tests,packages/dynamic-type-analysis/tests,rules/php-deglobalize/tests,rules/phalcon/tests,utils/documentation-generator/src,utils/phpstan-attribute-type-syncer/src,utils/phpstan-static-type-mapper-checker/src,rules/doctrine-gedmo-to-knplabs/tests,packages/polyfill/tests # see https://docs.sonarqube.org/latest/project-administration/narrowing-the-focus/#NarrowingtheFocus-patterns sonar.exclusions=src/**/*.php.inc,rules/**/*.php.inc,packages/**/*.php.inc,packages/**/Fixture/**/*,rules/**/Fixture/**/*,tests/**/Source/**/*