-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace squizlabs/php_codesniffer by symplify/easy-coding-standard
- Loading branch information
Showing
37 changed files
with
235 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
/docker/ | ||
/var/ | ||
/vendor/ | ||
/.phpcs-cache | ||
/.phpunit.result.cache | ||
/composer.lock | ||
/Taskfile.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<?php | ||
|
||
use PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\ForbiddenFunctionsSniff; | ||
use PhpCsFixer\Fixer\CastNotation\CastSpacesFixer; | ||
use PhpCsFixer\Fixer\ControlStructure\YodaStyleFixer; | ||
use PhpCsFixer\Fixer\FunctionNotation\FunctionDeclarationFixer; | ||
use PhpCsFixer\Fixer\FunctionNotation\NativeFunctionInvocationFixer; | ||
use PhpCsFixer\Fixer\LanguageConstruct\NullableTypeDeclarationFixer; | ||
use PhpCsFixer\Fixer\Strict\StrictComparisonFixer; | ||
use PhpCsFixer\Fixer\StringNotation\ExplicitStringVariableFixer; | ||
use PhpCsFixer\Fixer\Whitespace\BlankLineBeforeStatementFixer; | ||
use Presta\BehatEvaluator\Adapter\ScalarAdapter; | ||
use Symplify\CodingStandard\Fixer\ArrayNotation\ArrayListItemNewlineFixer; | ||
use Symplify\CodingStandard\Fixer\ArrayNotation\ArrayOpenerAndCloserNewlineFixer; | ||
use Symplify\CodingStandard\Fixer\ArrayNotation\StandaloneLineInMultilineArrayFixer; | ||
use Symplify\CodingStandard\Fixer\LineLength\LineLengthFixer; | ||
use Symplify\EasyCodingStandard\Config\ECSConfig; | ||
|
||
return ECSConfig::configure() | ||
->withPaths( | ||
[ | ||
__DIR__ . '/src', | ||
__DIR__ . '/tests', | ||
], | ||
) | ||
->withPreparedSets( | ||
psr12: true, | ||
arrays: true, | ||
comments: true, | ||
docblocks: true, | ||
namespaces: true, | ||
phpunit: true, | ||
strict: true, | ||
) | ||
->withConfiguredRule( | ||
BlankLineBeforeStatementFixer::class, | ||
[ | ||
'statements' => ['case', 'continue', 'declare', 'default', 'return', 'throw', 'try'], | ||
], | ||
) | ||
->withConfiguredRule( | ||
CastSpacesFixer::class, | ||
[ | ||
'space' => 'none', | ||
], | ||
) | ||
->withConfiguredRule( | ||
ForbiddenFunctionsSniff::class, | ||
[ | ||
'forbiddenFunctions' => ['dump' => null, 'dd' => null, 'var_dump' => null, 'die' => null], | ||
], | ||
) | ||
->withConfiguredRule( | ||
LineLengthFixer::class, | ||
[ | ||
LineLengthFixer::INLINE_SHORT_LINES => false, | ||
], | ||
) | ||
->withConfiguredRule( | ||
NativeFunctionInvocationFixer::class, | ||
[ | ||
'scope' => 'namespaced', | ||
'include' => ['@all'], | ||
], | ||
) | ||
->withConfiguredRule( | ||
NullableTypeDeclarationFixer::class, | ||
[ | ||
'syntax' => 'union', | ||
], | ||
) | ||
->withConfiguredRule( | ||
YodaStyleFixer::class, | ||
[ | ||
'equal' => true, | ||
'identical' => true, | ||
'less_and_greater' => false, | ||
], | ||
) | ||
->withRules([ | ||
FunctionDeclarationFixer::class, | ||
]) | ||
->withSkip( | ||
[ | ||
ArrayListItemNewlineFixer::class, | ||
ArrayOpenerAndCloserNewlineFixer::class, | ||
ExplicitStringVariableFixer::class, | ||
StandaloneLineInMultilineArrayFixer::class, | ||
StrictComparisonFixer::class => [ | ||
'src/Adapter/ScalarAdapter.php', | ||
], | ||
], | ||
) | ||
; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.