Skip to content

Commit

Permalink
Added PHP-CS-Fixer and PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
rudashi committed Mar 3, 2024
1 parent 52f04a6 commit 09c596f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
/.vscode
/vendor
/--cache-result
.phpunit.result.cache
.phpunit.result.cache
.php-cs-fixer.cache
8 changes: 6 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"php": ">=8.0"
},
"require-dev": {
"pestphp/pest": "^2.0"
"pestphp/pest": "^2.0",
"phpstan/phpstan": "^1.0",
"friendsofphp/php-cs-fixer": "^3.0"
},
"autoload": {
"psr-4": {
Expand All @@ -39,6 +41,8 @@
"prefer-stable": true,
"scripts": {
"test": "vendor/bin/pest",
"pest": "vendor/bin/pest"
"pest": "vendor/bin/pest",
"analyse": "vendor/bin/phpstan analyse src tests",
"pint": "vendor/bin/php-cs-fixer check src"
}
}
9 changes: 9 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
parameters:
paths:
- src
- tests
level: 6
ignoreErrors:
- "#Unsafe usage of new static#"
excludePaths:
- "tests/Pest.php"

0 comments on commit 09c596f

Please sign in to comment.