-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add php-cs-fixer, reformat code and update guzzle dependency
- Loading branch information
Showing
18 changed files
with
2,325 additions
and
80 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 @@ | ||
.idea | ||
vendor | ||
vendor | ||
.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,35 @@ | ||
<?php | ||
|
||
return PhpCsFixer\Config::create() | ||
->setRiskyAllowed(false) | ||
->setRules([ | ||
'@PSR2' => true, | ||
'@Symfony' => true, | ||
'@PhpCsFixer' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'cast_spaces' => ['space' => 'none'], | ||
'concat_space' => ['spacing' => 'one'], | ||
'yoda_style' => null, | ||
'ordered_class_elements' => null, | ||
'ordered_imports' => null, | ||
//'method_argument_space' => null, | ||
//'no_whitespace_in_blank_line' => null, | ||
//'no_extra_blank_lines' => null, | ||
//'braces' => null, | ||
'blank_line_before_statement' => null, | ||
'phpdoc_align' => ['align' => 'left'], | ||
'phpdoc_var_without_name' => null, | ||
'phpdoc_types_order' => null, | ||
'phpdoc_order' => null, | ||
'phpdoc_separation' => null, | ||
//'no_superfluous_elseif' => null, | ||
'class_definition' => null, | ||
'ternary_to_null_coalescing' => true, | ||
'php_unit_test_class_requires_covers' => false, | ||
'php_unit_internal_class' => false, | ||
]) | ||
->setFinder( | ||
PhpCsFixer\Finder::create() | ||
->in(__DIR__ . '/src') | ||
) | ||
; |
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,9 @@ | ||
current_dir = $(shell pwd) | ||
|
||
make: | ||
composer install | ||
composer dump-autoload | ||
|
||
cs-fix: | ||
./vendor/bin/php-cs-fixer fix ./src --config .php_cs.dist | ||
./vendor/bin/php-cs-fixer fix ./examples --config .php_cs.dist |
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 |
---|---|---|
|
@@ -27,5 +27,8 @@ | |
"psr-4": { | ||
"easybill\\SDK\\": "src/" | ||
} | ||
}, | ||
"require-dev": { | ||
"friendsofphp/php-cs-fixer": "^2.17" | ||
} | ||
} |
Oops, something went wrong.