feat: install phpstan and resolving reported errors in PHPStan

This commit is contained in:
amir-ys
2024-11-07 01:41:19 +03:30
parent b7efa6b24a
commit 865d565a91
27 changed files with 1023 additions and 642 deletions
Generated
+250 -1
View File
@@ -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": "e2748582c5a2c41a9931dc128d1bf8cb",
"content-hash": "d40968ccde886735623454e5620cb78b",
"packages": [
{
"name": "aws/aws-crt-php",
@@ -9579,6 +9579,110 @@
],
"time": "2024-10-15T15:12:40+00:00"
},
{
"name": "nunomaduro/larastan",
"version": "v2.9.10",
"source": {
"type": "git",
"url": "https://github.com/larastan/larastan.git",
"reference": "9e7233d88f4f10796fadb8a2d85c5f2b55277c76"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/larastan/larastan/zipball/9e7233d88f4f10796fadb8a2d85c5f2b55277c76",
"reference": "9e7233d88f4f10796fadb8a2d85c5f2b55277c76",
"shasum": ""
},
"require": {
"ext-json": "*",
"illuminate/console": "^9.52.16 || ^10.28.0 || ^11.16",
"illuminate/container": "^9.52.16 || ^10.28.0 || ^11.16",
"illuminate/contracts": "^9.52.16 || ^10.28.0 || ^11.16",
"illuminate/database": "^9.52.16 || ^10.28.0 || ^11.16",
"illuminate/http": "^9.52.16 || ^10.28.0 || ^11.16",
"illuminate/pipeline": "^9.52.16 || ^10.28.0 || ^11.16",
"illuminate/support": "^9.52.16 || ^10.28.0 || ^11.16",
"php": "^8.0.2",
"phpmyadmin/sql-parser": "^5.9.0",
"phpstan/phpstan": "^1.12.5"
},
"require-dev": {
"doctrine/coding-standard": "^12.0",
"nikic/php-parser": "^4.19.1",
"orchestra/canvas": "^7.11.1 || ^8.11.0 || ^9.0.2",
"orchestra/testbench": "^7.33.0 || ^8.13.0 || ^9.0.3",
"phpstan/phpstan-deprecation-rules": "^1.2",
"phpunit/phpunit": "^9.6.13 || ^10.5.16"
},
"suggest": {
"orchestra/testbench": "Using Larastan for analysing a package needs Testbench"
},
"type": "phpstan-extension",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
},
"phpstan": {
"includes": [
"extension.neon"
]
}
},
"autoload": {
"psr-4": {
"Larastan\\Larastan\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Can Vural",
"email": "can9119@gmail.com"
},
{
"name": "Nuno Maduro",
"email": "enunomaduro@gmail.com"
}
],
"description": "Larastan - Discover bugs in your code without running it. A phpstan/phpstan wrapper for Laravel",
"keywords": [
"PHPStan",
"code analyse",
"code analysis",
"larastan",
"laravel",
"package",
"php",
"static analysis"
],
"support": {
"issues": "https://github.com/larastan/larastan/issues",
"source": "https://github.com/larastan/larastan/tree/v2.9.10"
},
"funding": [
{
"url": "https://www.paypal.com/paypalme/enunomaduro",
"type": "custom"
},
{
"url": "https://github.com/canvural",
"type": "github"
},
{
"url": "https://github.com/nunomaduro",
"type": "github"
},
{
"url": "https://www.patreon.com/nunomaduro",
"type": "patreon"
}
],
"abandoned": "larastan/larastan",
"time": "2024-10-19T23:04:40+00:00"
},
{
"name": "phar-io/manifest",
"version": "2.0.4",
@@ -9697,6 +9801,151 @@
},
"time": "2022-02-21T01:04:05+00:00"
},
{
"name": "phpmyadmin/sql-parser",
"version": "5.10.0",
"source": {
"type": "git",
"url": "https://github.com/phpmyadmin/sql-parser.git",
"reference": "91d980ab76c3f152481e367f62b921adc38af451"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/91d980ab76c3f152481e367f62b921adc38af451",
"reference": "91d980ab76c3f152481e367f62b921adc38af451",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0",
"symfony/polyfill-mbstring": "^1.3",
"symfony/polyfill-php80": "^1.16"
},
"conflict": {
"phpmyadmin/motranslator": "<3.0"
},
"require-dev": {
"phpbench/phpbench": "^1.1",
"phpmyadmin/coding-standard": "^3.0",
"phpmyadmin/motranslator": "^4.0 || ^5.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.9.12",
"phpstan/phpstan-phpunit": "^1.3.3",
"phpunit/phpunit": "^8.5 || ^9.6",
"psalm/plugin-phpunit": "^0.16.1",
"vimeo/psalm": "^4.11",
"zumba/json-serializer": "~3.0.2"
},
"suggest": {
"ext-mbstring": "For best performance",
"phpmyadmin/motranslator": "Translate messages to your favorite locale"
},
"bin": [
"bin/highlight-query",
"bin/lint-query",
"bin/sql-parser",
"bin/tokenize-query"
],
"type": "library",
"autoload": {
"psr-4": {
"PhpMyAdmin\\SqlParser\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-2.0-or-later"
],
"authors": [
{
"name": "The phpMyAdmin Team",
"email": "developers@phpmyadmin.net",
"homepage": "https://www.phpmyadmin.net/team/"
}
],
"description": "A validating SQL lexer and parser with a focus on MySQL dialect.",
"homepage": "https://github.com/phpmyadmin/sql-parser",
"keywords": [
"analysis",
"lexer",
"parser",
"query linter",
"sql",
"sql lexer",
"sql linter",
"sql parser",
"sql syntax highlighter",
"sql tokenizer"
],
"support": {
"issues": "https://github.com/phpmyadmin/sql-parser/issues",
"source": "https://github.com/phpmyadmin/sql-parser"
},
"funding": [
{
"url": "https://www.phpmyadmin.net/donate/",
"type": "other"
}
],
"time": "2024-08-29T20:56:34+00:00"
},
{
"name": "phpstan/phpstan",
"version": "1.12.8",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "f6a60a4d66142b8156c9da923f1972657bc4748c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/f6a60a4d66142b8156c9da923f1972657bc4748c",
"reference": "f6a60a4d66142b8156c9da923f1972657bc4748c",
"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-11-06T19:06:49+00:00"
},
{
"name": "phpunit/php-code-coverage",
"version": "10.1.16",