Add PHPStan

This commit is contained in:
Oliver Davies 2024-02-20 08:30:00 +00:00
parent ec9ddbaf9c
commit 3ed3ee85b8
5 changed files with 90 additions and 2 deletions

4
.gitignore vendored
View file

@ -12,3 +12,7 @@
# Box # Box
/dist/ /dist/
/vendor-bin/ /vendor-bin/
###> phpstan/phpstan ###
phpstan.neon
###< phpstan/phpstan ###

View file

@ -66,6 +66,7 @@
} }
}, },
"require-dev": { "require-dev": {
"bamarni/composer-bin-plugin": "^1.8" "bamarni/composer-bin-plugin": "^1.8",
"phpstan/phpstan": "^1.10"
} }
} }

64
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "a1f732f5ff12a45f9756cf6322b15e05", "content-hash": "9285c8d125fdc3707daaddece946aa0b",
"packages": [ "packages": [
{ {
"name": "psr/cache", "name": "psr/cache",
@ -2518,6 +2518,68 @@
"source": "https://github.com/bamarni/composer-bin-plugin/tree/1.8.2" "source": "https://github.com/bamarni/composer-bin-plugin/tree/1.8.2"
}, },
"time": "2022-10-31T08:38:03+00:00" "time": "2022-10-31T08:38:03+00:00"
},
{
"name": "phpstan/phpstan",
"version": "1.10.58",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "a23518379ec4defd9e47cbf81019526861623ec2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/a23518379ec4defd9e47cbf81019526861623ec2",
"reference": "a23518379ec4defd9e47cbf81019526861623ec2",
"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"
},
{
"url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
"type": "tidelift"
}
],
"time": "2024-02-12T20:02:57+00:00"
} }
], ],
"aliases": [], "aliases": [],

9
phpstan.dist.neon Normal file
View file

@ -0,0 +1,9 @@
parameters:
level: 8
paths:
- bin/
- config/
- public/
- src/
- tests/
- versa

View file

@ -1,4 +1,16 @@
{ {
"phpstan/phpstan": {
"version": "1.10",
"recipe": {
"repo": "github.com/symfony/recipes-contrib",
"branch": "main",
"version": "1.0",
"ref": "5e490cc197fb6bb1ae22e5abbc531ddc633b6767"
},
"files": [
"phpstan.dist.neon"
]
},
"symfony/console": { "symfony/console": {
"version": "7.0", "version": "7.0",
"recipe": { "recipe": {