Add phpstan

This commit is contained in:
Chris 2024-10-07 11:41:21 +02:00
parent 98576daa67
commit 1f74bbfc0d
3 changed files with 79 additions and 3 deletions

View File

@ -19,5 +19,8 @@
},
"bin": [
"bin/jsonedit"
]
],
"require-dev": {
"phpstan/phpstan": "^1.12"
}
}

63
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "f4286ca23e3bc801977031988fb6cfe0",
"content-hash": "16f7942522788b41cf0d90d153b3f9c6",
"packages": [
{
"name": "symfony/polyfill-ctype",
@ -157,7 +157,66 @@
"time": "2024-09-17T12:49:58+00:00"
}
],
"packages-dev": [],
"packages-dev": [
{
"name": "phpstan/phpstan",
"version": "1.12.6",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "dc4d2f145a88ea7141ae698effd64d9df46527ae"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/dc4d2f145a88ea7141ae698effd64d9df46527ae",
"reference": "dc4d2f145a88ea7141ae698effd64d9df46527ae",
"shasum": ""
},
"require": {
"php": "^7.2|^8.0"
},
"conflict": {
"phpstan/phpstan-shim": "*"
},
"bin": [
"phpstan",
"phpstan.phar"
],
"type": "library",
"autoload": {
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "PHPStan - PHP Static Analysis Tool",
"keywords": [
"dev",
"static analysis"
],
"support": {
"docs": "https://phpstan.org/user-guide/getting-started",
"forum": "https://github.com/phpstan/phpstan/discussions",
"issues": "https://github.com/phpstan/phpstan/issues",
"security": "https://github.com/phpstan/phpstan/security/policy",
"source": "https://github.com/phpstan/phpstan-src"
},
"funding": [
{
"url": "https://github.com/ondrejmirtes",
"type": "github"
},
{
"url": "https://github.com/phpstan",
"type": "github"
}
],
"time": "2024-10-06T15:03:59+00:00"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],

14
phpstan.neon Normal file
View File

@ -0,0 +1,14 @@
parameters:
level: 5
excludePaths:
- doc
- vendor
- var
- tests
# Paths to include in the analysis
paths:
- src
treatPhpDocTypesAsCertain: false