Skip to content

Commit 248f26f

Browse files
committed
feat: add PHPStan.
1 parent b791f12 commit 248f26f

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@
4242
"nyholm/psr7": "^1.2",
4343
"oscarotero/php-cs-fixer-config": "^1.0",
4444
"brick/varexporter": "^0.3.1",
45-
"symfony/css-selector": "^5.0"
45+
"symfony/css-selector": "^5.0",
46+
"phpstan/phpstan": "^2.1",
47+
"phpstan/phpstan-strict-rules": "^2.0"
4648
},
4749
"suggest": {
4850
"symfony/css-selector": "If you want to get elements using css selectors"
@@ -64,6 +66,7 @@
6466
"demo": "php -S localhost:8888 demo/index.php",
6567
"test": "phpunit",
6668
"cs-fix": "php-cs-fixer fix",
69+
"phpstan": "phpstan --memory-limit=-1",
6770
"update-resources": [
6871
"php scripts/update-oembed.php",
6972
"php scripts/update-suffix.php"

phpstan.dist.neon

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
includes:
2+
- vendor/phpstan/phpstan-strict-rules/rules.neon
3+
4+
parameters:
5+
level: max
6+
paths:
7+
- src
8+
# - tests
9+
- issue-report/tests
10+
checkMissingCallableSignature: true
11+
checkUninitializedProperties: true
12+
checkTooWideReturnTypesInProtectedAndPublicMethods: true
13+
checkImplicitMixed: true

0 commit comments

Comments
 (0)