File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed
Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ Installation & usage
16162. Import the configuration file in your ` ecs.php` :
1717
1818 ` ` ` php
19- $containerConfigurator -> import(' vendor/mobizel/coding-standard/ecs.php' );
19+ $ecsConfig -> import(' vendor/mobizel/coding-standard/ecs.php' );
2020 ` ` `
2121
2222Example config (ecs.php)
@@ -26,10 +26,10 @@ Example config (ecs.php)
2626< ? php
2727
2828use PhpCsFixer\F ixer\C omment\H eaderCommentFixer;
29- use Symfony \C omponent \D ependencyInjection \L oader \C onfigurator \C ontainerConfigurator ;
29+ use Symplify \E asyCodingStandard \C onfig \E CSConfig ;
3030
31- return static function (ContainerConfigurator $containerConfigurator ): void {
32- $containerConfigurator -> import(' vendor/mobizel/coding-standard/ecs.php' );
31+ return static function (ECSConfig $ecsConfig ): void {
32+ $ecsConfig -> import(' vendor/mobizel/coding-standard/ecs.php' );
3333
3434 $header = <<< EOM
3535This file is part of < The Project> .
@@ -40,7 +40,7 @@ For the full copyright and license information, please view the LICENSE
4040file that was distributed with this source code.
4141EOM;
4242
43- $services = $containerConfigurator ->services ();
43+ $services = $ecsConfig ->services ();
4444 $services
4545 -> set(HeaderCommentFixer::class)
4646 -> call(' configure' , [[
Original file line number Diff line number Diff line change 1212use PhpCsFixer \Fixer \PhpUnit \PhpUnitTestClassRequiresCoversFixer ;
1313use PhpCsFixer \Fixer \Strict \DeclareStrictTypesFixer ;
1414use PhpCsFixer \Fixer \Strict \StrictComparisonFixer ;
15- use Symfony \ Component \ DependencyInjection \ Loader \ Configurator \ ContainerConfigurator ;
15+ use Symplify \ EasyCodingStandard \ Config \ ECSConfig ;
1616use Symplify \EasyCodingStandard \ValueObject \Set \SetList ;
1717
18- return static function (ContainerConfigurator $ containerConfigurator ): void {
19- $ containerConfigurator ->import (SetList::SYMFONY );
18+ return static function (ECSConfig $ ecsConfig ): void {
19+ $ ecsConfig ->import (SetList::PSR_12 );
2020
21- $ services = $ containerConfigurator ->services ();
21+ $ services = $ ecsConfig ->services ();
2222 $ services ->set (DeclareStrictTypesFixer::class);
2323 $ services ->set (OrderedImportsFixer::class);
2424 $ services ->set (NoUnusedImportsFixer::class);
3333 $ services ->set (TrailingCommaInMultilineFixer::class)
3434 ->call ('configure ' , [['elements ' => ['arrays ' , 'arguments ' , 'parameters ' ]]]);
3535
36- $ parameters = $ containerConfigurator ->parameters ();
36+ $ parameters = $ ecsConfig ->parameters ();
3737 $ parameters ->set ('skip ' , [
3838 VisibilityRequiredFixer::class => ['*Spec.php ' ],
3939 PhpUnitTestClassRequiresCoversFixer::class => ['*Test.php ' ],
Original file line number Diff line number Diff line change @@ -33,6 +33,6 @@ public function isIdentical(string $foo, string $bar): bool
3333 public function run (): void
3434 {
3535 /** @var string|null $description */
36- $ description = true ? 'This is a description ' : null ;
36+ $ description = true ? 'This is a ' . ' description ' : null ;
3737 }
3838}
You can’t perform that action at this time.
0 commit comments