Upgrade to PHPStan 2.0

This commit is contained in:
Art4 2024-11-12 21:02:21 +00:00
parent 9a04f90bbd
commit ca51b45f04
3 changed files with 12 additions and 9 deletions

View file

@ -152,7 +152,7 @@
"mikey179/vfsstream": "^1.6", "mikey179/vfsstream": "^1.6",
"mockery/mockery": "^1.3", "mockery/mockery": "^1.3",
"php-mock/php-mock-phpunit": "^2.10", "php-mock/php-mock-phpunit": "^2.10",
"phpstan/phpstan": "^1.12", "phpstan/phpstan": "^2.0",
"phpunit/phpunit": "^9" "phpunit/phpunit": "^9"
}, },
"scripts": { "scripts": {

14
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": "11175d4e9806e8a5069d010140431af1", "content-hash": "3e31a2243fb69e47e1b7000cca946fa2",
"packages": [ "packages": [
{ {
"name": "asika/simple-console", "name": "asika/simple-console",
@ -4834,20 +4834,20 @@
}, },
{ {
"name": "phpstan/phpstan", "name": "phpstan/phpstan",
"version": "1.12.7", "version": "2.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpstan.git", "url": "https://github.com/phpstan/phpstan.git",
"reference": "dc2b9976bd8b0f84ec9b0e50cc35378551de7af0" "reference": "ab4e9b4415a5fc9e4d27f7fe16c8bc9d067dcd6d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/dc2b9976bd8b0f84ec9b0e50cc35378551de7af0", "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ab4e9b4415a5fc9e4d27f7fe16c8bc9d067dcd6d",
"reference": "dc2b9976bd8b0f84ec9b0e50cc35378551de7af0", "reference": "ab4e9b4415a5fc9e4d27f7fe16c8bc9d067dcd6d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.2|^8.0" "php": "^7.4|^8.0"
}, },
"conflict": { "conflict": {
"phpstan/phpstan-shim": "*" "phpstan/phpstan-shim": "*"
@ -4888,7 +4888,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2024-10-18T11:12:07+00:00" "time": "2024-11-11T15:43:04+00:00"
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",

View file

@ -1899,8 +1899,11 @@ class Receiver
if (in_array(-1, $object_data['receiver'])) { if (in_array(-1, $object_data['receiver'])) {
$object_data['unlisted'] = true; $object_data['unlisted'] = true;
unset($object_data['receiver'][-1]); unset($object_data['receiver'][-1]);
if (array_key_exists(-1, $object_data['reception_type'])) {
unset($object_data['reception_type'][-1]); unset($object_data['reception_type'][-1]);
} }
}
return $object_data; return $object_data;
} }