Skip to content

Commit

Permalink
Add Symfony Coding Standard & PHP CodeSniffer to require-dev #21
Browse files Browse the repository at this point in the history
- Add `escapestudios/symfony2-coding-standard` to require-dev
- Add `squizlabs/php_codesniffer` to require-dev
- Add `phpcs.xml` as a default PHP CodeSniffer configuration
  • Loading branch information
ek9 committed Mar 19, 2018
1 parent 803d56d commit 3fc727b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
4 changes: 3 additions & 1 deletion composer.json
Expand Up @@ -29,7 +29,9 @@
"phpunit/php-code-coverage": "~6.0"
},
"require-dev": {
"bossa/phpspec2-expect": "^3.0"
"bossa/phpspec2-expect": "^3.0",
"escapestudios/symfony2-coding-standard": "^3.1",
"squizlabs/php_codesniffer": "^3.2"
},
"suggest": {
"ext-xdebug": "Install Xdebug to generate phpspec code coverage if you are not using phpdbg"
Expand Down
20 changes: 20 additions & 0 deletions phpcs.xml
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<!-- leanphp/common-dev phpcs.xml example config -->
<ruleset name="LeanPHP Coding Standard">
<description>LeanPHP Coding Standard</description>

<!-- directories and files to scan -->
<file>src</file>

<!-- directories and files to exclude -->
<exclude-pattern>test</exclude-pattern>
<exclude-pattern>tests</exclude-pattern>
<exclude-pattern>*Spec.php</exclude-pattern>

<!-- uncomment for a summary instead of detailed report -->
<!--<arg name="report" value="summary"/>-->
<arg value="p"/>>

<!-- Use Symfony2 Coding Standard -->
<rule ref="vendor/escapestudios/symfony2-coding-standard/Symfony"/>
</ruleset>

0 comments on commit 3fc727b

Please sign in to comment.