From 076d994baf9c9dbbff81fc9bbb2a582b50e2d0a6 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 19 Jan 2023 22:39:23 +0000 Subject: [PATCH] build: Add PHPStan --- composer.json | 3 ++- composer.lock | 61 ++++++++++++++++++++++++++++++++++++++++++++++- phpstan.neon.dist | 5 ++++ 3 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 phpstan.neon.dist diff --git a/composer.json b/composer.json index ca606f7..eff9efd 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,8 @@ }, "require-dev": { "humbug/box": "^4.2", - "symfony/var-dumper": "^6.2" + "symfony/var-dumper": "^6.2", + "phpstan/phpstan": "^1.9" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index ede2809..8069f74 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "cd4297546e12f0fef941f564d6d9b4c4", + "content-hash": "fe9a106d0218c0c62cedc7771a44b321", "packages": [ { "name": "psr/container", @@ -2554,6 +2554,65 @@ }, "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", "version": "1.0.0", diff --git a/phpstan.neon.dist b/phpstan.neon.dist new file mode 100644 index 0000000..ea3fd19 --- /dev/null +++ b/phpstan.neon.dist @@ -0,0 +1,5 @@ +parameters: + level: 8 + paths: + - bin + - src