Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Commit

Permalink
install cs tool
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Jul 19, 2017
1 parent de92227 commit 7c2a81c
Show file tree
Hide file tree
Showing 3 changed files with 537 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .php_cs
@@ -0,0 +1,22 @@
<?php

$finder = Symfony\Component\Finder\Finder::create()
->notPath('bootstrap')
->notPath('storage')
->notPath('vendor')
->in(__DIR__)
->name('*.php')
->name('_ide_helper')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true);


return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sortAlgorithm' => 'alpha'],
'no_unused_imports' => true,
])
->setFinder($finder);
4 changes: 4 additions & 0 deletions composer.json
Expand Up @@ -17,6 +17,7 @@
"spatie/laravel-tail": "^1.4"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.4",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.7"
Expand All @@ -35,6 +36,9 @@
}
},
"scripts": {
"fix-cs": [
"vendor/bin/php-cs-fixer fix ."
],
"post-root-package-install": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
Expand Down

0 comments on commit 7c2a81c

Please sign in to comment.