diff --git a/composer.json b/composer.json index 77caa3d..ff3342f 100644 --- a/composer.json +++ b/composer.json @@ -19,5 +19,8 @@ }, "bin": [ "bin/jsonedit" - ] + ], + "require-dev": { + "phpstan/phpstan": "^1.12" + } } diff --git a/composer.lock b/composer.lock index 079bd31..fd147a1 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": "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": [], diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..377ce6b --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,14 @@ +parameters: + level: 5 + + excludePaths: + - doc + - vendor + - var + - tests + + # Paths to include in the analysis + paths: + - src + + treatPhpDocTypesAsCertain: false