From e15b317d099552c772bf7db133b2b26bf6238f1e Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sun, 12 Sep 2021 18:08:32 +0100 Subject: [PATCH] build: Add PHPStan [ci skip] --- composer.json | 1 + composer.lock | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++- phpstan.neon | 4 ++++ 3 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 phpstan.neon diff --git a/composer.json b/composer.json index 09d8f2ba..8aec5462 100644 --- a/composer.json +++ b/composer.json @@ -26,6 +26,7 @@ "sort-packages": true }, "require-dev": { + "phpstan/phpstan": "^0.12.98", "phpunit/phpunit": "^9.5" }, "autoload": { diff --git a/composer.lock b/composer.lock index a39e123d..796f532b 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": "e16352573256967e1714ff2adc994bbf", + "content-hash": "ae345e15b82c45a1aca0dbe4473948cb", "packages": [ { "name": "dflydev/ant-path-matcher", @@ -4630,6 +4630,70 @@ }, "time": "2021-03-17T13:42:18+00:00" }, + { + "name": "phpstan/phpstan", + "version": "0.12.98", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "3bb7cc246c057405dd5e290c3ecc62ab51d57e00" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/3bb7cc246c057405dd5e290c3ecc62ab51d57e00", + "reference": "3bb7cc246c057405dd5e290c3ecc62ab51d57e00", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.12-dev" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "support": { + "issues": "https://github.com/phpstan/phpstan/issues", + "source": "https://github.com/phpstan/phpstan/tree/0.12.98" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpstan", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2021-09-02T12:33:01+00:00" + }, { "name": "phpunit/php-code-coverage", "version": "9.2.6", diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 00000000..c839c3fa --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,4 @@ +parameters: + level: 5 + paths: + - src