mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-15 09:30:58 +00:00
[CS] Upgraded ecs.php configuration
This commit is contained in:
parent
ca41cb687b
commit
c4a6653df6
1 changed files with 21 additions and 23 deletions
44
ecs.php
44
ecs.php
|
|
@ -9,22 +9,30 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use PhpCsFixer\Fixer\ClassNotation\VisibilityRequiredFixer;
|
use PhpCsFixer\Fixer\ClassNotation\VisibilityRequiredFixer;
|
||||||
use PhpCsFixer\Fixer\Comment\HeaderCommentFixer;
|
use PhpCsFixer\Fixer\Comment\HeaderCommentFixer;
|
||||||
use SlevomatCodingStandard\Sniffs\Commenting\InlineDocCommentDeclarationSniff;
|
use SlevomatCodingStandard\Sniffs\Commenting\InlineDocCommentDeclarationSniff;
|
||||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
use Symplify\EasyCodingStandard\Config\ECSConfig;
|
||||||
use Symplify\EasyCodingStandard\ValueObject\Option;
|
|
||||||
|
|
||||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
return static function (ECSConfig $config): void {
|
||||||
$containerConfigurator->import('vendor/sylius-labs/coding-standard/ecs.php');
|
$config->import('vendor/sylius-labs/coding-standard/ecs.php');
|
||||||
|
|
||||||
$containerConfigurator->services()
|
$config->parallel();
|
||||||
->set(HeaderCommentFixer::class)
|
$config->paths(['src/Sylius']);
|
||||||
->call('configure', [
|
$config->skip([
|
||||||
[
|
InlineDocCommentDeclarationSniff::class . '.MissingVariable',
|
||||||
'location' => 'after_open',
|
InlineDocCommentDeclarationSniff::class . '.NoAssignment',
|
||||||
'comment_type' => HeaderCommentFixer::HEADER_COMMENT,
|
VisibilityRequiredFixer::class => ['*Spec.php'],
|
||||||
'header' => <<<TEXT
|
'**/var/*',
|
||||||
|
]);
|
||||||
|
$config->ruleWithConfiguration(
|
||||||
|
HeaderCommentFixer::class,
|
||||||
|
[
|
||||||
|
'location' => 'after_open',
|
||||||
|
'comment_type' => HeaderCommentFixer::HEADER_COMMENT,
|
||||||
|
'header' => <<<TEXT
|
||||||
This file is part of the Sylius package.
|
This file is part of the Sylius package.
|
||||||
|
|
||||||
(c) Paweł Jędrzejewski
|
(c) Paweł Jędrzejewski
|
||||||
|
|
@ -32,16 +40,6 @@ This file is part of the Sylius package.
|
||||||
For the full copyright and license information, please view the LICENSE
|
For the full copyright and license information, please view the LICENSE
|
||||||
file that was distributed with this source code.
|
file that was distributed with this source code.
|
||||||
TEXT
|
TEXT
|
||||||
]
|
]
|
||||||
]);
|
);
|
||||||
|
|
||||||
$parameters = $containerConfigurator->parameters();
|
|
||||||
$parameters->set(Option::PARALLEL, true);
|
|
||||||
$parameters->set(Option::PATHS, ['src/Sylius']);
|
|
||||||
$parameters->set(Option::SKIP, [
|
|
||||||
InlineDocCommentDeclarationSniff::class . '.MissingVariable',
|
|
||||||
InlineDocCommentDeclarationSniff::class . '.NoAssignment',
|
|
||||||
VisibilityRequiredFixer::class => ['*Spec.php'],
|
|
||||||
'**/var/*',
|
|
||||||
]);
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue