-
Notifications
You must be signed in to change notification settings - Fork 67
feat: automatic code style checking #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 7 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
1af3625
Relocate tests bootstrap and add phpunit configuration file
misantron cbf4635
TravisCI configuration update
misantron 35e414c
Composer dependencies update, scripts section added
misantron 8e0a497
Gitignore update
misantron 2062f55
PhpCsFixer configuration added
misantron e5aa357
Classes code style automatic fixes
misantron 50f3b72
Method description fix
misantron 9bbcf55
Composer ext-mbstring dependency added
misantron 9004f53
EOF fixes added
misantron 22852e8
Merge branch 'master' into issue108-patch
misantron fa85386
Actualize code style auto check
misantron 7111791
Refactoring TravisCI config - try improve version matrix run
misantron ca267d8
Use own dependencies version for each build, do not reinstall it insi…
misantron 7e4b287
Add Composer self-update before build run
misantron 968078e
Try to fix lowest dependencies builds run
misantron d447954
Try to fix lowest dependencies builds run
misantron d7f9098
No need to support PHPUnit 4
misantron ee55feb
Bump PHPUnit version to 5.7
misantron 96859ef
Fix to display correct PHPUnit version on lowest dependencies build run
misantron File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
|
@@ -8,4 +8,9 @@ vendor/ | |
.idea/ | ||
|
||
# Environment files | ||
.env/*.* | ||
.env/*.* | ||
|
||
# Local configs | ||
.php_cs | ||
.php_cs.cache | ||
phpunit.xml | ||
This file contains hidden or 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,33 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->in(__DIR__ . '/lib'); | ||
|
||
return PhpCsFixer\Config::create() | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@Symfony' => true, | ||
'binary_operator_spaces' => array( | ||
'align_equals' => false, | ||
'align_double_arrow' => false, | ||
), | ||
'@Symfony:risky' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'linebreak_after_opening_tag' => true, | ||
'mb_str_functions' => true, | ||
'no_php4_constructor' => true, | ||
'no_unreachable_default_argument_value' => true, | ||
'no_useless_else' => true, | ||
'no_useless_return' => true, | ||
'ordered_imports' => true, | ||
'php_unit_strict' => true, | ||
'phpdoc_order' => true, | ||
'semicolon_after_instruction' => true, | ||
'strict_comparison' => true, | ||
'strict_param' => true, | ||
'concat_space' => ['spacing' => 'one'], | ||
'trailing_comma_in_multiline_array' => true, | ||
'yoda_style' => false, | ||
]) | ||
->setFinder($finder) | ||
->setCacheFile(__DIR__ . '/.php_cs.cache'); |
This file contains hidden or 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 hidden or 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,36 +1,54 @@ | ||
{ | ||
"name": "sendgrid/php-http-client", | ||
"description": "HTTP REST client, simplified for PHP", | ||
"type": "library", | ||
"version": "3.9.6", | ||
"homepage": "http://github.com/sendgrid/php-http-client", | ||
"keywords": ["SendGrid", "HTTP", "REST", "API", "Fluent"], | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Matt Bernier", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Elmer Thomas", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"php": ">=5.6" | ||
"name": "sendgrid/php-http-client", | ||
"description": "HTTP REST client, simplified for PHP", | ||
"type": "library", | ||
"version": "3.9.6", | ||
"homepage": "http://github.com/sendgrid/php-http-client", | ||
"keywords": [ | ||
"SendGrid", | ||
"HTTP", | ||
"REST", | ||
"API", | ||
"Fluent" | ||
], | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Matt Bernier", | ||
"email": "[email protected]" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "~4.4", | ||
"squizlabs/php_codesniffer": "~2.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"SendGrid\\": "lib/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"SendGrid\\Test\\": "test/unit/" | ||
} | ||
{ | ||
"name": "Elmer Thomas", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"php": ">=5.6", | ||
"ext-json": "*", | ||
"ext-curl": "*" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "~4.8", | ||
"friendsofphp/php-cs-fixer": "~2.10", | ||
"squizlabs/php_codesniffer": "~3.3" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"SendGrid\\": "lib/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"SendGrid\\Test\\": "test/unit/" | ||
} | ||
}, | ||
"scripts": { | ||
"test": "phpunit --testsuite unit", | ||
"php-cs-fix": "php-cs-fixer fix --diff --verbose --config=.php_cs", | ||
"php-cs": "phpcs --standard=PSR1,PSR2 lib" | ||
}, | ||
"config": { | ||
"optimize-autoloader": true, | ||
"sort-packages": true | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.