build: Add PHPStan

This commit is contained in:
Oliver Davies 2023-01-19 22:39:23 +00:00
parent b72f26b035
commit 076d994baf
3 changed files with 67 additions and 2 deletions

View file

@ -7,7 +7,8 @@
}, },
"require-dev": { "require-dev": {
"humbug/box": "^4.2", "humbug/box": "^4.2",
"symfony/var-dumper": "^6.2" "symfony/var-dumper": "^6.2",
"phpstan/phpstan": "^1.9"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {

61
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": "cd4297546e12f0fef941f564d6d9b4c4", "content-hash": "fe9a106d0218c0c62cedc7771a44b321",
"packages": [ "packages": [
{ {
"name": "psr/container", "name": "psr/container",
@ -2554,6 +2554,65 @@
}, },
"time": "2022-10-14T12:47:21+00:00" "time": "2022-10-14T12:47:21+00:00"
}, },
{
"name": "phpstan/phpstan",
"version": "1.9.14",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "e5fcc96289cf737304286a9b505fbed091f02e58"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/e5fcc96289cf737304286a9b505fbed091f02e58",
"reference": "e5fcc96289cf737304286a9b505fbed091f02e58",
"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": {
"issues": "https://github.com/phpstan/phpstan/issues",
"source": "https://github.com/phpstan/phpstan/tree/1.9.14"
},
"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": "2023-01-19T10:47:09+00:00"
},
{ {
"name": "psr/event-dispatcher", "name": "psr/event-dispatcher",
"version": "1.0.0", "version": "1.0.0",

5
phpstan.neon.dist Normal file
View file

@ -0,0 +1,5 @@
parameters:
level: 8
paths:
- bin
- src