-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EZP-28161: Enable php-cs-fixer aligned with v2.7.1 settings (#25)
* EZP-28161: [CS] Created php-cs-fixer config aligned with v2.7.1 settings * EZP-28161: [Composer] Added dev dependency for php-cs-fixer:~2.7.1 * EZP-28161: [Composer] Added composer command fix-cs Usage: composer fix-cs * EZP-28161: [CS] Fixed code according to CS rules Fixed: 1) Tests/View/SystemInfoViewBuilderTest.php (no_unused_imports) 2) Tests/SystemInfo/Collector/DoctrineDatabaseSystemInfoCollectorTest.php (no_unused_imports) 3) Tests/SystemInfo/Collector/EzcPhpSystemInfoCollectorTest.php (function_to_constant, trailing_comma_in_multiline_array) 4) View/SystemInfoViewBuilder.php (no_unused_imports) 5) SystemInfo/Registry/IdentifierBased.php (single_quote) 6) SystemInfo/OutputFormat/JsonOutputFormat.php (no_spaces_inside_parenthesis) 7) SystemInfo/OutputFormatRegistry.php (single_quote) 8) SystemInfo/OutputFormat.php (phpdoc_summary) 9) SystemInfo/EzcSystemInfoWrapper.php (phpdoc_scalar, braces) 10) SystemInfo/Collector/EzcPhpSystemInfoCollector.php (function_to_constant, phpdoc_summary) 11) SystemInfo/Collector/EzcHardwareSystemInfoCollector.php (phpdoc_summary) 12) SystemInfo/Collector/DoctrineDatabaseSystemInfoCollector.php (phpdoc_summary) 13) Command/SystemInfoDumpCommand.php (method_separation, phpdoc_indent, no_unused_imports, blank_line_before_statement, braces) 14) DependencyInjection/EzSystemsEzSupportToolsExtension.php (concat_space) * [Travis] Created test matrix: dropped PHP 5.5 testing, added 7.1 testing * EZP-28161: [Travis] Added CodeStyle testing using php-cs-fixer * EZP-28161: [Travis] Disabled XDebug when running php-cs-fixer (for better performance)
- Loading branch information
Showing
18 changed files
with
97 additions
and
53 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,2 +1,3 @@ | ||
/vendor/ | ||
composer.lock | ||
.php_cs.cache |
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,37 @@ | ||
<?php | ||
|
||
// PHP-CS-Fixer 2.x syntax | ||
return PhpCsFixer\Config::create() | ||
->setRules( | ||
[ | ||
'@Symfony' => true, | ||
'@Symfony:risky' => true, | ||
'concat_space' => ['spacing' => 'one'], | ||
'array_syntax' => false, | ||
'simplified_null_return' => false, | ||
'phpdoc_align' => false, | ||
'phpdoc_separation' => false, | ||
'phpdoc_to_comment' => false, | ||
'cast_spaces' => false, | ||
'blank_line_after_opening_tag' => false, | ||
'single_blank_line_before_namespace' => false, | ||
'phpdoc_annotation_without_dot' => false, | ||
'phpdoc_no_alias_tag' => false, | ||
'space_after_semicolon' => false, | ||
'yoda_style' => false, | ||
'no_break_comment' => false, | ||
] | ||
) | ||
->setRiskyAllowed(true) | ||
->setFinder( | ||
PhpCsFixer\Finder::create() | ||
->in(__DIR__) | ||
->exclude( | ||
[ | ||
'bin', | ||
'Resources', | ||
'vendor', | ||
] | ||
) | ||
->files()->name('*.php') | ||
); |
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