1
0
mirror of https://github.com/jupeter/clean-code-php.git synced 2025-09-25 21:49:04 +02:00

restore required mallforms

This commit is contained in:
Tomas Votruba
2020-10-28 23:50:49 +01:00
parent 9df6c175c9
commit 43dfecd7d6
3 changed files with 10 additions and 6 deletions

View File

@@ -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

View File

@@ -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)**

View File

@@ -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,
]);
};