Skip to content

Commit

Permalink
Add php-codesniffer to the project
Browse files Browse the repository at this point in the history
  • Loading branch information
Sander De la Marche committed Mar 27, 2023
1 parent 813c336 commit 5da4f53
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
.phpunit.result.cache
/composer.lock
/.tools/*
!.gitkeep
!.gitkeep
.phpcs-cache
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"require-dev": {
"ext-xdebug": ">=3.1",
"phpunit/phpunit": "^9",
"phpstan/phpstan": "^1.10"
"phpstan/phpstan": "^1.10",
"squizlabs/php_codesniffer": "^3.7"
}
}
17 changes: 17 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">

<arg name="basepath" value="."/>
<arg name="cache" value=".phpcs-cache"/>
<arg name="colors"/>
<arg name="extensions" value="php"/>

<rule ref="PSR12"/>

<file>src/</file>
<file>bin/</file>
<file>tests/</file>

<exclude-pattern>vendor</exclude-pattern>
</ruleset>

0 comments on commit 5da4f53

Please sign in to comment.