-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make code-style more consistent (#355)
* update branch-alias * add php-cs-fixer configuration * add php-cs-fixer to travis * apply code-style rules
- Loading branch information
1 parent
7eb38e2
commit 42c1043
Showing
67 changed files
with
442 additions
and
334 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 |
---|---|---|
|
@@ -5,6 +5,8 @@ coverage | |
.buildpath | ||
.project | ||
.settings | ||
.php_cs | ||
.php_cs.cache | ||
composer.lock | ||
docs-api | ||
phpunit.xml |
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,31 @@ | ||
<?php | ||
|
||
$finder = new PhpCsFixer\Finder(); | ||
$config = new PhpCsFixer\Config('json-schema', 'json-schema style guide'); | ||
$finder->in(__DIR__); | ||
|
||
/* Based on ^2.1 of php-cs-fixer */ | ||
$config | ||
->setRules(array( | ||
// default | ||
'@PSR2' => true, | ||
'@Symfony' => true, | ||
// additionally | ||
'array_syntax' => array('syntax' => 'long'), | ||
'binary_operator_spaces' => false, | ||
'concat_space' => array('spacing' => 'one'), | ||
'no_unused_imports' => false, | ||
'no_useless_else' => true, | ||
'no_useless_return' => true, | ||
'ordered_imports' => true, | ||
'phpdoc_no_package' => false, | ||
'phpdoc_order' => true, | ||
'phpdoc_summary' => false, | ||
'pre_increment' => false, | ||
'trailing_comma_in_multiline_array' => false, | ||
'simplified_null_return' => false, | ||
)) | ||
->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
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.