Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3fc727b

Browse files
committed
Add Symfony Coding Standard & PHP CodeSniffer to require-dev #21
- Add `escapestudios/symfony2-coding-standard` to require-dev - Add `squizlabs/php_codesniffer` to require-dev - Add `phpcs.xml` as a default PHP CodeSniffer configuration
1 parent 803d56d commit 3fc727b

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
"phpunit/php-code-coverage": "~6.0"
3030
},
3131
"require-dev": {
32-
"bossa/phpspec2-expect": "^3.0"
32+
"bossa/phpspec2-expect": "^3.0",
33+
"escapestudios/symfony2-coding-standard": "^3.1",
34+
"squizlabs/php_codesniffer": "^3.2"
3335
},
3436
"suggest": {
3537
"ext-xdebug": "Install Xdebug to generate phpspec code coverage if you are not using phpdbg"

phpcs.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0"?>
2+
<!-- leanphp/common-dev phpcs.xml example config -->
3+
<ruleset name="LeanPHP Coding Standard">
4+
<description>LeanPHP Coding Standard</description>
5+
6+
<!-- directories and files to scan -->
7+
<file>src</file>
8+
9+
<!-- directories and files to exclude -->
10+
<exclude-pattern>test</exclude-pattern>
11+
<exclude-pattern>tests</exclude-pattern>
12+
<exclude-pattern>*Spec.php</exclude-pattern>
13+
14+
<!-- uncomment for a summary instead of detailed report -->
15+
<!--<arg name="report" value="summary"/>-->
16+
<arg value="p"/>>
17+
18+
<!-- Use Symfony2 Coding Standard -->
19+
<rule ref="vendor/escapestudios/symfony2-coding-standard/Symfony"/>
20+
</ruleset>

0 commit comments

Comments
 (0)