-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update php-cs-fixer and phpstan (#152)
* Update php-cs-fixer * Remove php-cs-fixer from PHP 7.2 pipeline * Update phpstan * Add phpstan baseline * Add PHP 8.1 pipeline * Fix php-cs * Fix ci for removing php-cs-fixer/shim
- Loading branch information
1 parent
f8f865c
commit 0f96d4c
Showing
67 changed files
with
988 additions
and
442 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 |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
# PHPCS | ||
.php_cs.cache | ||
.php-cs-fixer.cache | ||
|
||
# composer | ||
/composer.phar | ||
|
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,55 @@ | ||
<?php | ||
|
||
$header = <<<EOF | ||
This file is part of Sulu. | ||
(c) Sulu GmbH | ||
This source file is subject to the MIT license that is bundled | ||
with this source code in the file LICENSE. | ||
EOF; | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->exclude(['var/cache', 'var/coverage.php']) | ||
->in(__DIR__); | ||
|
||
$config = new PhpCsFixer\Config(); | ||
$config->setRiskyAllowed(true) | ||
->setRules([ | ||
'@Symfony' => true, | ||
'@Symfony:risky' => true, | ||
'ordered_imports' => true, | ||
'concat_space' => ['spacing' => 'one'], | ||
'array_syntax' => ['syntax' => 'short'], | ||
'phpdoc_align' => ['align' => 'left'], | ||
'class_definition' => [ | ||
'multi_line_extends_each_single_line' => true, | ||
] , | ||
'linebreak_after_opening_tag' => true, | ||
// 'declare_strict_types' => true, | ||
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], | ||
'native_constant_invocation' => true, | ||
'native_function_casing' => true, | ||
'native_function_invocation' => ['include' => ['@internal']], | ||
'no_php4_constructor' => true, | ||
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true, 'remove_inheritdoc' => true], | ||
'no_unreachable_default_argument_value' => true, | ||
'no_useless_else' => true, | ||
'no_useless_return' => true, | ||
'php_unit_strict' => true, | ||
'phpdoc_order' => true, | ||
'semicolon_after_instruction' => true, | ||
'strict_comparison' => true, | ||
'strict_param' => true, | ||
'array_indentation' => true, | ||
'multiline_whitespace_before_semicolons' => true, | ||
'single_line_throw' => false, | ||
'visibility_required' => ['elements' => ['property', 'method', 'const']], | ||
'phpdoc_to_comment' => [ | ||
'ignored_tags' => ['todo', 'var'], | ||
], | ||
'trailing_comma_in_multiline' => ['elements' => ['arrays', /*'arguments', 'parameters' */]], | ||
]) | ||
->setFinder($finder); | ||
|
||
return $config; |
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.