Skip to content

Commit

Permalink
Add PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
rilwis committed Nov 5, 2024
1 parent 5f6a400 commit 9d971de
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ composer.lock
package-lock.json
package.json
phpcs.xml
phpstan.neon.dist
pnpm-lock.yaml
README.md

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ js/build
js/link-attributes/block-editor/dist

phpcs.txt
phpstan.neon
phpstan.txt
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"post-install-cmd": [
"echo Deleting .git dirs...",
"rm -rf vendor/**/**/.git"
]
],
"phpstan": "phpstan --memory-limit=2048M > phpstan.txt"
}
}
13 changes: 13 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
parameters:
level: 5
paths:
- src
scanDirectories:
- ../../../wp-includes
- ../../../wp-admin
- ../../themes/bricks
- ../woocommerce
- ../wordpress-seo
- ../wp-seopress
ignoreErrors:
- '#Constant [A-Z0-9_]+ not found.#'

0 comments on commit 9d971de

Please sign in to comment.