Skip to content

Commit

Permalink
Update PhpStan, ESC
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubboucek committed Apr 5, 2021
1 parent 2724453 commit 03627f8
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 5 deletions.
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
"ext-zlib": "*"
},
"require-dev": {
"phpstan/phpstan": "^0.12.48",
"symplify/easy-coding-standard": "^8.3"
"phpstan/phpstan": "^0.12.83",
"symplify/easy-coding-standard": "^9.2"
},
"autoload": {
"psr-4": {
"JakubBoucek\\Tar\\": "src/"
}
},
"scripts": {
"phpstan": "phpstan analyse src --level 6",
"ecs": "ecs check src --set psr12",
"ecs-fix": "ecs check src --set psr12 --fix"
"phpstan": "phpstan analyse src --level 7",
"ecs": "ecs check src",
"ecs-fix": "ecs check src --fix"
}
}
29 changes: 29 additions & 0 deletions ecs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

declare(strict_types=1);

use PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\EasyCodingStandard\ValueObject\Option;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;

return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(ArraySyntaxFixer::class)
->call('configure', [[
'syntax' => 'short',
]]);

$parameters = $containerConfigurator->parameters();
$parameters->set(Option::PATHS, [
__DIR__ . '/src',
]);

$parameters->set(Option::SETS, [
SetList::ARRAY,
SetList::NAMESPACES,
SetList::CONTROL_STRUCTURES,
SetList::CLEAN_CODE,
SetList::PSR_12,
]);
};

0 comments on commit 03627f8

Please sign in to comment.