mirror of
https://github.com/jupeter/clean-code-php.git
synced 2025-09-25 13:39:04 +02:00
restore required mallforms
This commit is contained in:
2
.github/workflows/coding_standard.yaml
vendored
2
.github/workflows/coding_standard.yaml
vendored
@@ -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
|
@@ -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)**
|
||||
|
5
ecs.php
5
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,
|
||||
]);
|
||||
};
|
||||
|
Reference in New Issue
Block a user