Skip to content

Commit

Permalink
First stab are replacing squizlabs/php_codesniffer with friendsofphp/…
Browse files Browse the repository at this point in the history
…php-cs-fixer
  • Loading branch information
WyriHaximus committed May 10, 2017
1 parent efab1bb commit 41f90b3
Show file tree
Hide file tree
Showing 5 changed files with 1,071 additions and 52 deletions.
8 changes: 8 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php declare(strict_types=1);

use ApiClients\Tools\TestUtilities\PhpCsFixerConfig;

return PhpCsFixerConfig::create()->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__)
);
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ init:
cs:
composer cs

cs-fix:
composer cs-fix

unit:
composer run-script unit --timeout=0

Expand Down
10 changes: 7 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"require": {
"php": "^7.0",
"clue/block-react": "^1.1",
"friendsofphp/php-cs-fixer": "^2.3",
"jakub-onderka/php-console-highlighter": "^0.3.2",
"jakub-onderka/php-parallel-lint": "^0.9.2",
"phake/phake": "^2.3",
"phpunit/phpunit": "^6.0",
"squizlabs/php_codesniffer": "^2.6"
"phpunit/phpunit": "^6.0"
},
"autoload": {
"psr-4": {
Expand All @@ -35,7 +35,11 @@
"ensure-installed": "composer install --ansi -n -q",
"cs": [
"@ensure-installed",
"phpcs --standard=PSR2 src/"
"php-cs-fixer fix --config=.php_cs --path-mode=intersection --dry-run --verbose --allow-risky=yes --show-progress=estimating"
],
"cs-fix": [
"@ensure-installed",
"php-cs-fixer fix --config=.php_cs --verbose --diff --allow-risky=yes --show-progress=estimating"
],
"unit": [
"@ensure-installed",
Expand Down

0 comments on commit 41f90b3

Please sign in to comment.