Skip to content

Commit

Permalink
Update easy-coding-standard.php
Browse files Browse the repository at this point in the history
  • Loading branch information
trejjam committed Jun 25, 2022
1 parent dd86d73 commit d80efb7
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions bin/easy-coding-standard.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@
use PhpCsFixer\Fixer\FunctionNotation\ReturnTypeDeclarationFixer;
use PhpCsFixer\Fixer\Operator\BinaryOperatorSpacesFixer;
use PhpCsFixer\Fixer\PhpTag\BlankLineAfterOpeningTagFixer;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\EasyCodingStandard\Config\ECSConfig;
use Symplify\EasyCodingStandard\ValueObject\Option;

$rootDir = __DIR__ . '/../';

return static function (ContainerConfigurator $containerConfigurator) use ($rootDir) : void {
$containerConfigurator->import($rootDir . 'vendor/symplify/easy-coding-standard/config/set/common/array.php');
return static function (ECSConfig $ecsConfig) use ($rootDir) : void {
$ecsConfig->import($rootDir . 'vendor/symplify/easy-coding-standard/config/set/common/array.php');

$containerConfigurator->import($rootDir . 'vendor/symplify/easy-coding-standard/config/set/common/control-structures.php');
$ecsConfig->import($rootDir . 'vendor/symplify/easy-coding-standard/config/set/common/control-structures.php');

$containerConfigurator->import($rootDir . 'vendor/symplify/easy-coding-standard/config/set/common/docblock.php');
$ecsConfig->import($rootDir . 'vendor/symplify/easy-coding-standard/config/set/common/docblock.php');

$containerConfigurator->import($rootDir . 'vendor/symplify/easy-coding-standard/config/set/common/namespaces.php');
$ecsConfig->import($rootDir . 'vendor/symplify/easy-coding-standard/config/set/common/namespaces.php');

$containerConfigurator->import($rootDir . 'vendor/symplify/easy-coding-standard/config/set/common/strict.php');
$ecsConfig->import($rootDir . 'vendor/symplify/easy-coding-standard/config/set/common/strict.php');

$containerConfigurator->import($rootDir . 'vendor/symplify/easy-coding-standard/config/set/clean-code.php');
$ecsConfig->import($rootDir . 'vendor/symplify/easy-coding-standard/config/set/clean-code.php');

$containerConfigurator->import($rootDir . 'vendor/symplify/easy-coding-standard/config/set/psr12.php');
$ecsConfig->import($rootDir . 'vendor/symplify/easy-coding-standard/config/set/psr12.php');

$parameters = $containerConfigurator->parameters();
$parameters = $ecsConfig->parameters();

$parameters->set(Option::INDENTATION, Option::INDENTATION_SPACES);

Expand All @@ -37,10 +37,7 @@
ScopeIndentSniff::class => null,
]);

$services = $containerConfigurator->services();

$services->set(ReturnTypeDeclarationFixer::class)
->call('configure', [[
'space_before' => 'one',
]]);
$ecsConfig->ruleWithConfiguration(ReturnTypeDeclarationFixer::class, [
'space_before' => 'one',
]);
};

0 comments on commit d80efb7

Please sign in to comment.