Skip to content

Commit 17d0eac

Browse files
committed
Add .php_cs file
- Add a configuration file for PHP Coding Standards Fixer. - Running `php-cs-fixer fix` will now automatically fix any coding standards violations. http://cs.sensiolabs.org
1 parent 7305d45 commit 17d0eac

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
composer.lock
33
vendor/
44
composer.phar
5+
.php_cs.cache
56

67
#editor related
78
.idea
@@ -17,4 +18,4 @@ ehthumbs.db
1718
Thumbs.db
1819

1920
#generator related
20-
generator/*
21+
generator/*

.php_cs

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
function php_cs() {
4+
$finder = Symfony\CS\Finder\DefaultFinder::create()
5+
->exclude('benchmarks')
6+
->exclude('docs')
7+
->exclude('util')
8+
->in(__DIR__);
9+
10+
return Symfony\CS\Config\Config::create()
11+
->setUsingCache(true)
12+
->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
13+
->finder($finder);
14+
}
15+
16+
return php_cs();

0 commit comments

Comments
 (0)