-
-
Notifications
You must be signed in to change notification settings - Fork 518
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
261 additions
and
222 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,52 +1,61 @@ | ||
<?php | ||
|
||
$finder = Symfony\CS\Finder\DefaultFinder::create() | ||
->exclude('files') | ||
->exclude('vendor') | ||
->in(__DIR__); | ||
return PhpCsFixer\Config::create() | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@PSR2' => true, | ||
|
||
return Symfony\CS\Config\Config::create() | ||
->level(Symfony\CS\FixerInterface::PSR2_LEVEL) | ||
->fixers([ | ||
/** | ||
* symfony | ||
*/ | ||
// Ensure there is no code on the same line as the PHP open tag and it is followed by a blankline. | ||
'blankline_after_open_tag', | ||
'blank_line_after_opening_tag' => true, | ||
// Remove duplicated semicolons. | ||
'duplicate_semicolon', | ||
// Removes extra empty lines. | ||
'extra_empty_lines', | ||
'no_empty_statement' => true, | ||
// PHP multi-line arrays should have a trailing comma. | ||
'multiline_array_trailing_comma', | ||
'trailing_comma_in_multiline_array' => true, | ||
// There should be no empty lines after class opening brace. | ||
'no_blank_lines_after_class_opening', | ||
'no_blank_lines_after_class_opening' => true, | ||
// There should not be blank lines between docblock and the documented element. | ||
'no_empty_lines_after_phpdocs', | ||
'no_blank_lines_after_phpdoc' => true, | ||
// Phpdocs short descriptions should end in either a full stop, exclamation mark, or question mark. | ||
'phpdoc_short_description', | ||
'phpdoc_summary' => true, | ||
// Phpdocs should start and end with content, excluding the very first and last line of the docblocks. | ||
'phpdoc_trim', | ||
'phpdoc_trim' => true, | ||
// Removes line breaks between use statements. | ||
'remove_lines_between_uses', | ||
'no_extra_consecutive_blank_lines' => ['use'], | ||
// An empty line feed should precede a return statement. | ||
'return', | ||
'blank_line_before_return' => true, | ||
// There should be exactly one blank line before a namespace declaration. | ||
'single_blank_line_before_namespace', | ||
'single_blank_line_before_namespace' => true, | ||
// Convert double quotes to single quotes for simple strings. | ||
'single_quote', | ||
'single_quote' => true, | ||
// Unused use statements must be removed. | ||
'unused_use', | ||
'no_unused_imports' => true, | ||
// Methods must be separated with one blank line. | ||
'method_separation' => true, | ||
// Binary operators should be surrounded by at least one space. | ||
'binary_operator_spaces' => ['align_double_arrow' => false], | ||
// A single space should be between cast and variable. | ||
'cast_spaces' => true, | ||
|
||
/** | ||
* contrib | ||
*/ | ||
// Concatenation should be used with at least one whitespace around. | ||
'concat_with_spaces', | ||
// Ensure there is no code on the same line as the PHP open tag. | ||
'newline_after_open_tag', | ||
'concat_space' => ['spacing' => 'one'], | ||
// Ordering use statements. | ||
'ordered_use', | ||
'ordered_imports' => true, | ||
// PHP arrays should be declared using the configured syntax. | ||
'array_syntax' => ['syntax' => 'short'] | ||
]) | ||
->setUsingCache(true) | ||
->finder($finder); | ||
->setFinder( | ||
PhpCsFixer\Finder::create() | ||
->exclude('files') | ||
->exclude('vendor') | ||
->in(__DIR__) | ||
->name('*.php') | ||
->ignoreDotFiles(true) | ||
->ignoreVCS(true) | ||
) | ||
->setUsingCache(true); |
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
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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.