diff --git a/.github/workflows/coding_standard.yaml b/.github/workflows/coding_standard.yaml index 4e9ee45..fa949ec 100644 --- a/.github/workflows/coding_standard.yaml +++ b/.github/workflows/coding_standard.yaml @@ -15,6 +15,6 @@ jobs: php-version: 7.4 coverage: none - - run: composer install --no-progress + - run: composer install --no-progress --ansi - run: vendor/bin/ecs check-markdown README.md --ansi \ No newline at end of file diff --git a/README.md b/README.md index fee6bba..3fd40d9 100644 --- a/README.md +++ b/README.md @@ -453,7 +453,7 @@ declare(strict_types=1); $a = '42'; $b = 42; -if ($a !== $b) { +if ($a != $b) { // The expression will always pass } ``` @@ -862,8 +862,8 @@ function splitIntoFirstAndLastName(): void splitIntoFirstAndLastName(); -// ['Ryan', 'McDermott']; var_dump($name); +// ['Ryan', 'McDermott']; ``` **Good:** @@ -879,10 +879,11 @@ function splitIntoFirstAndLastName(string $name): array $name = 'Ryan McDermott'; $newName = splitIntoFirstAndLastName($name); -// 'Ryan McDermott'; var_dump($name); -// ['Ryan', 'McDermott']; +// 'Ryan McDermott'; + var_dump($newName); +// ['Ryan', 'McDermott']; ``` **[⬆ back to top](#table-of-contents)** diff --git a/ecs.php b/ecs.php index 82c2f24..9555953 100644 --- a/ecs.php +++ b/ecs.php @@ -2,6 +2,8 @@ declare(strict_types=1); +use PhpCsFixer\Fixer\PhpTag\BlankLineAfterOpeningTagFixer; +use PhpCsFixer\Fixer\Strict\StrictComparisonFixer; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symplify\EasyCodingStandard\ValueObject\Option; use Symplify\EasyCodingStandard\ValueObject\Set\SetList; @@ -22,6 +24,7 @@ return static function (ContainerConfigurator $containerConfigurator): void ]); $parameters->set(Option::SKIP, [ - \PhpCsFixer\Fixer\PhpTag\BlankLineAfterOpeningTagFixer::class => null, + BlankLineAfterOpeningTagFixer::class => null, + StrictComparisonFixer::class => null, ]); };