From c2a49baf458c95ceccbc1f73dc541cad109f8b35 Mon Sep 17 00:00:00 2001 From: konradoboza Date: Tue, 2 Jul 2024 10:18:15 +0200 Subject: [PATCH 1/2] Regenerated PHPStan baseline --- phpstan-baseline.neon | 30 ++++++++++++------- ...ustedHeaderClientIpEventSubscriberTest.php | 5 +++- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index df24cda6eb..04e2eb9268 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -9341,12 +9341,12 @@ parameters: path: src/lib/FieldType/Image/ImageStorage.php - - message: "#^Cannot access offset 0 on array\\{0\\: int, 1\\: int, 2\\: int, 3\\: string, mime\\: string, channels\\?\\: int, bits\\?\\: int\\}\\|false\\.$#" + message: "#^Cannot access offset 0 on array\\{0\\: int\\<1, max\\>, 1\\: int\\<1, max\\>, 2\\: int, 3\\: string, mime\\: string, channels\\?\\: int, bits\\?\\: int\\}\\|false\\.$#" count: 1 path: src/lib/FieldType/Image/ImageStorage.php - - message: "#^Cannot access offset 1 on array\\{0\\: int, 1\\: int, 2\\: int, 3\\: string, mime\\: string, channels\\?\\: int, bits\\?\\: int\\}\\|false\\.$#" + message: "#^Cannot access offset 1 on array\\{0\\: int\\<1, max\\>, 1\\: int\\<1, max\\>, 2\\: int, 3\\: string, mime\\: string, channels\\?\\: int, bits\\?\\: int\\}\\|false\\.$#" count: 1 path: src/lib/FieldType/Image/ImageStorage.php @@ -11036,17 +11036,17 @@ parameters: path: src/lib/IO/MetadataHandler.php - - message: "#^Cannot access offset 'mime' on array\\{0\\: int, 1\\: int, 2\\: int, 3\\: string, mime\\: string, channels\\?\\: int, bits\\?\\: int\\}\\|false\\.$#" + message: "#^Cannot access offset 'mime' on array\\{0\\: int\\<1, max\\>, 1\\: int\\<1, max\\>, 2\\: int, 3\\: string, mime\\: string, channels\\?\\: int, bits\\?\\: int\\}\\|false\\.$#" count: 1 path: src/lib/IO/MetadataHandler/ImageSize.php - - message: "#^Cannot access offset 0 on array\\{0\\: int, 1\\: int, 2\\: int, 3\\: string, mime\\: string, channels\\?\\: int, bits\\?\\: int\\}\\|false\\.$#" + message: "#^Cannot access offset 0 on array\\{0\\: int\\<1, max\\>, 1\\: int\\<1, max\\>, 2\\: int, 3\\: string, mime\\: string, channels\\?\\: int, bits\\?\\: int\\}\\|false\\.$#" count: 1 path: src/lib/IO/MetadataHandler/ImageSize.php - - message: "#^Cannot access offset 1 on array\\{0\\: int, 1\\: int, 2\\: int, 3\\: string, mime\\: string, channels\\?\\: int, bits\\?\\: int\\}\\|false\\.$#" + message: "#^Cannot access offset 1 on array\\{0\\: int\\<1, max\\>, 1\\: int\\<1, max\\>, 2\\: int, 3\\: string, mime\\: string, channels\\?\\: int, bits\\?\\: int\\}\\|false\\.$#" count: 1 path: src/lib/IO/MetadataHandler/ImageSize.php @@ -24455,6 +24455,11 @@ parameters: count: 2 path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php + - + message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertContains\\(\\) expects iterable, array\\|bool\\|float\\|int\\|string\\|null given\\.$#" + count: 1 + path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php + - message: "#^Property Ibexa\\\\Tests\\\\Bundle\\\\Core\\\\DependencyInjection\\\\IbexaCoreExtensionTest\\:\\:\\$minimalConfig has no type specified\\.$#" count: 1 @@ -25205,11 +25210,6 @@ parameters: count: 1 path: tests/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriberTest.php - - - message: "#^Method Ibexa\\\\Tests\\\\Bundle\\\\Core\\\\EventSubscriber\\\\TrustedHeaderClientIpEventSubscriberTest\\:\\:__construct\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" - count: 1 - path: tests/bundle/Core/EventSubscriber/TrustedHeaderClientIpEventSubscriberTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Bundle\\\\Core\\\\EventSubscriber\\\\TrustedHeaderClientIpEventSubscriberTest\\:\\:getTrustedHeaderEventSubscriberTestData\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 @@ -50350,6 +50350,11 @@ parameters: count: 1 path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + - + message: "#^Method PHPUnit\\\\Framework\\\\Assert\\:\\:equalTo\\(\\) invoked with 2 parameters, 1 required\\.$#" + count: 2 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + - message: "#^Property Ibexa\\\\Tests\\\\Core\\\\Persistence\\\\Legacy\\\\Content\\\\ContentHandlerTest\\:\\:\\$contentHandler \\(Ibexa\\\\Core\\\\Persistence\\\\Legacy\\\\Content\\\\Handler\\) in isset\\(\\) is not nullable\\.$#" count: 1 @@ -53165,6 +53170,11 @@ parameters: count: 1 path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php + - + message: "#^Method PHPUnit\\\\Framework\\\\Assert\\:\\:equalTo\\(\\) invoked with 2 parameters, 1 required\\.$#" + count: 2 + path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php + - message: "#^Property Ibexa\\\\Tests\\\\Core\\\\Persistence\\\\Legacy\\\\Content\\\\Type\\\\ContentTypeHandlerTest\\:\\:\\$gatewayMock \\(Ibexa\\\\Core\\\\Persistence\\\\Legacy\\\\Content\\\\Type\\\\Gateway\\) in isset\\(\\) is not nullable\\.$#" count: 1 diff --git a/tests/bundle/Core/EventSubscriber/TrustedHeaderClientIpEventSubscriberTest.php b/tests/bundle/Core/EventSubscriber/TrustedHeaderClientIpEventSubscriberTest.php index db84d93207..55446a653d 100644 --- a/tests/bundle/Core/EventSubscriber/TrustedHeaderClientIpEventSubscriberTest.php +++ b/tests/bundle/Core/EventSubscriber/TrustedHeaderClientIpEventSubscriberTest.php @@ -29,7 +29,10 @@ final class TrustedHeaderClientIpEventSubscriberTest extends TestCase private const CUSTOM_CLIENT_IP = '234.123.78.98'; - public function __construct($name = null, array $data = [], $dataName = '') + /** + * @param array $data + */ + public function __construct(?string $name = null, array $data = [], string $dataName = '') { parent::__construct($name, $data, $dataName); From 21ec5750365dc626e48fa61f58fb1f8ce48a8e50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Niedzielski?= Date: Tue, 2 Jul 2024 10:50:35 +0200 Subject: [PATCH 2/2] Regenerated baseline --- phpstan-baseline.neon | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 04e2eb9268..abdd9d0e44 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -24455,11 +24455,6 @@ parameters: count: 2 path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - message: "#^Parameter \\#2 \\$haystack of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertContains\\(\\) expects iterable, array\\|bool\\|float\\|int\\|string\\|null given\\.$#" - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - message: "#^Property Ibexa\\\\Tests\\\\Bundle\\\\Core\\\\DependencyInjection\\\\IbexaCoreExtensionTest\\:\\:\\$minimalConfig has no type specified\\.$#" count: 1 @@ -50350,11 +50345,6 @@ parameters: count: 1 path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - message: "#^Method PHPUnit\\\\Framework\\\\Assert\\:\\:equalTo\\(\\) invoked with 2 parameters, 1 required\\.$#" - count: 2 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - message: "#^Property Ibexa\\\\Tests\\\\Core\\\\Persistence\\\\Legacy\\\\Content\\\\ContentHandlerTest\\:\\:\\$contentHandler \\(Ibexa\\\\Core\\\\Persistence\\\\Legacy\\\\Content\\\\Handler\\) in isset\\(\\) is not nullable\\.$#" count: 1 @@ -53170,11 +53160,6 @@ parameters: count: 1 path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - message: "#^Method PHPUnit\\\\Framework\\\\Assert\\:\\:equalTo\\(\\) invoked with 2 parameters, 1 required\\.$#" - count: 2 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - message: "#^Property Ibexa\\\\Tests\\\\Core\\\\Persistence\\\\Legacy\\\\Content\\\\Type\\\\ContentTypeHandlerTest\\:\\:\\$gatewayMock \\(Ibexa\\\\Core\\\\Persistence\\\\Legacy\\\\Content\\\\Type\\\\Gateway\\) in isset\\(\\) is not nullable\\.$#" count: 1