-
Notifications
You must be signed in to change notification settings - Fork 5
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 with symplify/easy-coding-standard (#…
…60) * Replace squizlabs/php_codesniffer with symplify/easy-coding-standard * Fixed code style issues with enhanced symplify/easy-coding-standard config * Fixed issues with strict type added by the code style
- Loading branch information
1 parent
86b7058
commit c256c9c
Showing
39 changed files
with
131 additions
and
236 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
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,58 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\ForbiddenFunctionsSniff; | ||
use PhpCsFixer\Fixer\ControlStructure\YodaStyleFixer; | ||
use PhpCsFixer\Fixer\FunctionNotation\FunctionDeclarationFixer; | ||
use PhpCsFixer\Fixer\FunctionNotation\NativeFunctionInvocationFixer; | ||
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; | ||
use Symplify\EasyCodingStandard\ValueObject\Set\SetList; | ||
|
||
return function (ECSConfig $ecsConfig): void { | ||
$ecsConfig->paths([ | ||
__DIR__ . '/src', | ||
__DIR__ . '/tests/Integration/src', | ||
__DIR__ . '/tests/Integration/tests', | ||
__DIR__ . '/tests/Unit', | ||
]); | ||
|
||
$ecsConfig->sets([ | ||
SetList::ARRAY, | ||
SetList::DOCBLOCK, | ||
SetList::NAMESPACES, | ||
SetList::COMMENTS, | ||
SetList::STRICT, | ||
SetList::PSR_12, | ||
]); | ||
|
||
$ecsConfig->skip([ | ||
/* Do not force array on multiple lines : ['foo' => $foo, 'bar' => $bar] */ | ||
ArrayOpenerAndCloserNewlineFixer::class, | ||
ArrayListItemNewlineFixer::class, | ||
StandaloneLineInMultilineArrayFixer::class, | ||
]); | ||
|
||
$ecsConfig->ruleWithConfiguration(YodaStyleFixer::class, [ | ||
'equal' => false, | ||
'identical' => false, | ||
'less_and_greater' => false, | ||
]); | ||
$ecsConfig->ruleWithConfiguration(LineLengthFixer::class, [ | ||
LineLengthFixer::INLINE_SHORT_LINES => false, | ||
]); | ||
$ecsConfig->ruleWithConfiguration(ForbiddenFunctionsSniff::class, [ | ||
'forbiddenFunctions' => ['dump' => null, 'dd' => null, 'var_dump' => null, 'die' => null], | ||
]); | ||
$ecsConfig->ruleWithConfiguration(FunctionDeclarationFixer::class, [ | ||
'closure_fn_spacing' => 'none', | ||
]); | ||
$ecsConfig->ruleWithConfiguration(NativeFunctionInvocationFixer::class, [ | ||
'scope' => 'namespaced', | ||
'include' => ['@all'], | ||
]); | ||
}; |
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
Oops, something went wrong.