-
Notifications
You must be signed in to change notification settings - Fork 729
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Base PHP-cs-fixer migration to version 2 plus style fix
- Loading branch information
1 parent
83d1a61
commit 657da46
Showing
419 changed files
with
996 additions
and
551 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,26 @@ | ||
<?php | ||
|
||
$finder = Symfony\CS\Finder\DefaultFinder::create() | ||
->in(['lib', 'test']); | ||
$finder = PhpCsFixer\Finder::create() | ||
->exclude(['vendor', 'var']) | ||
->in([__DIR__]) | ||
; | ||
|
||
$config = Symfony\CS\Config\Config::create() | ||
->setUsingCache(true) | ||
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL) | ||
->fixers([ | ||
// [contrib] Multi-line whitespace before closing semicolon are prohibited. | ||
'multiline_spaces_before_semicolon', | ||
// [contrib] There should be no blank lines before a namespace declaration. | ||
'no_blank_lines_before_namespace', | ||
// [contrib] Ordering use statements. | ||
'ordered_use', | ||
// [contrib] Annotations should be ordered so that param annotations come first, then throws annotations, then return annotations. | ||
'phpdoc_order', | ||
// [contrib] Arrays should use the short syntax. | ||
'short_array_syntax', | ||
// [contrib] Ensure there is no code on the same line as the PHP open tag. | ||
'newline_after_open_tag', | ||
// [contrib] Use null coalescing operator ?? where possible | ||
'ternary_to_null_coalescing', | ||
// [contrib] There should not be useless else cases. | ||
'no_useless_else', | ||
// [contrib] Use dedicated PHPUnit assertions for better error messages. | ||
$config = PhpCsFixer\Config::create() | ||
->setFinder($finder) | ||
->setRules([ | ||
'@PSR2' => true, | ||
'@Symfony' => true, | ||
'psr0' => false, | ||
'single_blank_line_before_namespace' => false, | ||
'ordered_imports' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'phpdoc_order' => true, | ||
'blank_line_after_namespace' => true, | ||
'ternary_to_null_coalescing' => true, | ||
'no_useless_else' => true, | ||
'@PHPUnit60Migration:risky' => true, | ||
//'php_unit_dedicate_assert' => ['target' => 'newest'], | ||
'php_unit_dedicate_assert' => ['target' => 'newest'], | ||
]) | ||
->finder($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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
namespace Elastica\Aggregation; | ||
|
||
use Elastica\Exception\InvalidException; | ||
|
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
namespace Elastica\Aggregation; | ||
|
||
use Elastica\Exception\InvalidException; | ||
|
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
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.