From 592fbf3ccbb75bc6ea78a8463e5cbc53fb6bfa7d Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 13 Nov 2024 14:40:27 +0100 Subject: [PATCH 01/15] Add phpstan in CI --- composer.json | 7 +- phpstan-baseline.neon | 1047 +++++++++++++++++++++++++++++++++++++++++ phpstan.neon | 8 + 3 files changed, 1060 insertions(+), 2 deletions(-) create mode 100644 phpstan-baseline.neon create mode 100644 phpstan.neon diff --git a/composer.json b/composer.json index ab50698..f825cc8 100644 --- a/composer.json +++ b/composer.json @@ -24,16 +24,19 @@ "guzzlehttp/guzzle": "^6.0 | ^7.0", "phpunit/phpunit": "^7.0 | ^9.0", "shoppingfeed/coding-style-php": "~2.1.0", - "overtrue/phplint": "^1.1" + "overtrue/phplint": "^1.1", + "phpstan/phpstan": "^1.4" }, "scripts": { "test": [ "@tests-unit", + "@phpstan", "@phpcs" ], "tests-unit": "vendor/bin/phpunit", "phpcs": "vendor/bin/sfcs src --progress -vvv", - "phpcsfix": "vendor/bin/sfcs src --progress -vvv --autofix" + "phpcsfix": "vendor/bin/sfcs src --progress -vvv --autofix", + "phpstan": "vendor/bin/phpstan analyse" }, "scripts-descriptions": { "test" : "Run PHPUnit tests suites and Coding standards validator" diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 0000000..4188a3a --- /dev/null +++ b/phpstan-baseline.neon @@ -0,0 +1,1047 @@ +parameters: + ignoreErrors: + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Catalog\\\\InventoryDomain\\:\\:execute\\(\\) return type has no value type specified in iterable type ShoppingFeed\\\\Sdk\\\\Api\\\\Catalog\\\\InventoryCollection\\.$#" + count: 1 + path: src/Api/Catalog/InventoryDomain.php + + - + message: "#^Parameter \\#1 \\$resource of class ShoppingFeed\\\\Sdk\\\\Api\\\\Catalog\\\\InventoryResource constructor expects ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource, ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource\\|null given\\.$#" + count: 1 + path: src/Api/Catalog/InventoryDomain.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Catalog\\\\InventoryUpdate\\:\\:__construct\\(\\) has parameter \\$operations with no value type specified in iterable type Traversable\\.$#" + count: 1 + path: src/Api/Catalog/InventoryUpdate.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Catalog\\\\InventoryUpdate\\:\\:__construct\\(\\) has parameter \\$operations with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Catalog/InventoryUpdate.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Catalog\\\\InventoryUpdate\\:\\:__construct\\(\\) has parameter \\$operations with no value type specified in iterable type array\\|Traversable\\.$#" + count: 1 + path: src/Api/Catalog/InventoryUpdate.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Catalog\\\\InventoryUpdate\\:\\:createBatchProcessorCallback\\(\\) has parameter \\$requests with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Catalog/InventoryUpdate.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Catalog\\\\InventoryUpdate\\:\\:createSuccessCallback\\(\\) has parameter \\$resources with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Catalog/InventoryUpdate.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Catalog\\\\InventoryUpdate\\:\\:execute\\(\\) return type has no value type specified in iterable type ShoppingFeed\\\\Sdk\\\\Api\\\\Catalog\\\\InventoryCollection\\.$#" + count: 1 + path: src/Api/Catalog/InventoryUpdate.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Catalog\\\\PricingDomain\\:\\:execute\\(\\) return type has no value type specified in iterable type ShoppingFeed\\\\Sdk\\\\Api\\\\Catalog\\\\PricingCollection\\.$#" + count: 1 + path: src/Api/Catalog/PricingDomain.php + + - + message: "#^Parameter \\#1 \\$resource of class ShoppingFeed\\\\Sdk\\\\Api\\\\Catalog\\\\PricingResource constructor expects ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource, ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource\\|null given\\.$#" + count: 1 + path: src/Api/Catalog/PricingDomain.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Catalog\\\\PricingUpdate\\:\\:__construct\\(\\) has parameter \\$operations with no value type specified in iterable type Traversable\\.$#" + count: 1 + path: src/Api/Catalog/PricingUpdate.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Catalog\\\\PricingUpdate\\:\\:__construct\\(\\) has parameter \\$operations with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Catalog/PricingUpdate.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Catalog\\\\PricingUpdate\\:\\:__construct\\(\\) has parameter \\$operations with no value type specified in iterable type array\\|Traversable\\.$#" + count: 1 + path: src/Api/Catalog/PricingUpdate.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Catalog\\\\PricingUpdate\\:\\:createBatchProcessorCallback\\(\\) has parameter \\$requests with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Catalog/PricingUpdate.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Catalog\\\\PricingUpdate\\:\\:createSuccessCallback\\(\\) has parameter \\$resources with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Catalog/PricingUpdate.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Catalog\\\\PricingUpdate\\:\\:execute\\(\\) return type has no value type specified in iterable type ShoppingFeed\\\\Sdk\\\\Api\\\\Catalog\\\\PricingCollection\\.$#" + count: 1 + path: src/Api/Catalog/PricingUpdate.php + + - + message: "#^Cannot call method getHref\\(\\) on ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\|null\\.$#" + count: 1 + path: src/Api/Channel/ChannelResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Channel\\\\ChannelResource\\:\\:getCountryCodes\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Channel/ChannelResource.php + + - + message: "#^Property ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\Identifier\\\\Id\\:\\:\\$id has no type specified\\.$#" + count: 1 + path: src/Api/Order/Identifier/Id.php + + - + message: "#^Cannot call method format\\(\\) on DateTime\\|false\\.$#" + count: 1 + path: src/Api/Order/Operation.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\Operation\\:\\:addOperation\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Order/Operation.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\Operation\\:\\:populateRequests\\(\\) has parameter \\$requests with generic interface ArrayAccess but does not specify its types\\: TKey, TValue$#" + count: 1 + path: src/Api/Order/Operation.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\Operation\\:\\:refund\\(\\) has parameter \\$products with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Order/Operation.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\Operation\\:\\:ship\\(\\) has parameter \\$items with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Order/Operation.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderDomain\\:\\:getShipmentsByOrder\\(\\) should return iterable\\&ShoppingFeed\\\\Sdk\\\\Resource\\\\PaginatedResourceIterator but returns iterable\\&Traversable\\.$#" + count: 1 + path: src/Api/Order/OrderDomain.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderItem\\:\\:__construct\\(\\) has parameter \\$additionalFields with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Order/OrderItem.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderItem\\:\\:getAdditionalFields\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Order/OrderItem.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderItem\\:\\:getAdditionalFields\\(\\) should return array but returns array\\|null\\.$#" + count: 1 + path: src/Api/Order/OrderItem.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderItem\\:\\:toArray\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Order/OrderItem.php + + - + message: "#^Property ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderItem\\:\\:\\$additionalFields type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Order/OrderItem.php + + - + message: "#^Class ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderItemCollection implements generic interface IteratorAggregate but does not specify its types\\: TKey, TValue$#" + count: 1 + path: src/Api/Order/OrderItemCollection.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderItemCollection\\:\\:add\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Api/Order/OrderItemCollection.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderItemCollection\\:\\:fromProperties\\(\\) has parameter \\$items with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Order/OrderItemCollection.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderItemCollection\\:\\:getIterator\\(\\) return type with generic class ArrayIterator does not specify its types\\: TKey, TValue$#" + count: 1 + path: src/Api/Order/OrderItemCollection.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderItemCollection\\:\\:toArray\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Order/OrderItemCollection.php + + - + message: "#^Property ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderItemCollection\\:\\:\\$items type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Order/OrderItemCollection.php + + - + message: "#^Class class@anonymous/Api/Order/OrderOperation\\.php\\:237 constructor invoked with 0 parameters, 2 required\\.$#" + count: 1 + path: src/Api/Order/OrderOperation.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderOperation\\:\\:refund\\(\\) has parameter \\$products with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Order/OrderOperation.php + + - + message: "#^Call to an undefined method iterable\\&Traversable\\:\\:wait\\(\\)\\.$#" + count: 1 + path: src/Api/Order/OrderOperationResult.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderOperationResult\\:\\:__construct\\(\\) has parameter \\$resources with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Order/OrderOperationResult.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderOperationResult\\:\\:setBatches\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Api/Order/OrderOperationResult.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderOperationResult\\:\\:setBatches\\(\\) has parameter \\$resources with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Order/OrderOperationResult.php + + - + message: "#^PHPDoc tag @var above a method has no effect\\.$#" + count: 1 + path: src/Api/Order/OrderOperationResult.php + + - + message: "#^Cannot call method withAddedHref\\(\\) on ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\|null\\.$#" + count: 1 + path: src/Api/Order/OrderResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderResource\\:\\:getBillingAddress\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Order/OrderResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderResource\\:\\:getCreatedAt\\(\\) should return DateTimeImmutable but returns DateTimeImmutable\\|null\\.$#" + count: 1 + path: src/Api/Order/OrderResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderResource\\:\\:getItemsReferencesAliases\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Order/OrderResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderResource\\:\\:getLatestShipDate\\(\\) should return DateTimeImmutable but returns DateTimeImmutable\\|null\\.$#" + count: 1 + path: src/Api/Order/OrderResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderResource\\:\\:getPaymentInformation\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Order/OrderResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderResource\\:\\:getShipment\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Order/OrderResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderResource\\:\\:getShipments\\(\\) should return iterable\\&ShoppingFeed\\\\Sdk\\\\Resource\\\\PaginatedResourceIterator but returns iterable\\&Traversable\\.$#" + count: 1 + path: src/Api/Order/OrderResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderResource\\:\\:getShippingAddress\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Order/OrderResource.php + + - + message: "#^Parameter \\#1 \\$resource of class ShoppingFeed\\\\Sdk\\\\Api\\\\Channel\\\\ChannelResource constructor expects ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource, ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource\\|null given\\.$#" + count: 1 + path: src/Api/Order/OrderResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\Shipment\\\\ShipmentResource\\:\\:getCreatedAt\\(\\) should return DateTimeImmutable but returns DateTimeImmutable\\|null\\.$#" + count: 1 + path: src/Api/Order/Shipment/ShipmentResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\Shipment\\\\ShipmentResource\\:\\:getItems\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Order/Shipment/ShipmentResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\Shipment\\\\ShipmentResource\\:\\:getReturnInfo\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Order/Shipment/ShipmentResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Session\\\\SessionResource\\:\\:getRoles\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Session/SessionResource.php + + - + message: "#^Parameter \\#1 \\$id of method ShoppingFeed\\\\Sdk\\\\Api\\\\Store\\\\StoreCollection\\:\\:getById\\(\\) expects int, int\\|string given\\.$#" + count: 1 + path: src/Api/Session/SessionResource.php + + - + message: "#^Parameter \\#1 \\$resource of class ShoppingFeed\\\\Sdk\\\\Api\\\\Channel\\\\ChannelResource constructor expects ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource, ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource\\|null given\\.$#" + count: 1 + path: src/Api/Store/StoreChannelResource.php + + - + message: "#^Property ShoppingFeed\\\\Sdk\\\\Api\\\\Store\\\\StoreChannelResource\\:\\:\\$channel has no type specified\\.$#" + count: 1 + path: src/Api/Store/StoreChannelResource.php + + - + message: "#^Parameter \\#1 \\$id of method ShoppingFeed\\\\Sdk\\\\Api\\\\Store\\\\StoreCollection\\:\\:getById\\(\\) expects int, int\\|string given\\.$#" + count: 1 + path: src/Api/Store/StoreCollection.php + + - + message: "#^Parameter \\#1 \\$link of class ShoppingFeed\\\\Sdk\\\\Api\\\\Catalog\\\\InventoryDomain constructor expects ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink, ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\|null given\\.$#" + count: 1 + path: src/Api/Store/StoreResource.php + + - + message: "#^Parameter \\#1 \\$link of class ShoppingFeed\\\\Sdk\\\\Api\\\\Catalog\\\\PricingDomain constructor expects ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink, ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\|null given\\.$#" + count: 1 + path: src/Api/Store/StoreResource.php + + - + message: "#^Parameter \\#1 \\$link of class ShoppingFeed\\\\Sdk\\\\Api\\\\Order\\\\OrderDomain constructor expects ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink, ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\|null given\\.$#" + count: 1 + path: src/Api/Store/StoreResource.php + + - + message: "#^Parameter \\#1 \\$link of class ShoppingFeed\\\\Sdk\\\\Api\\\\Store\\\\StoreChannelDomain constructor expects ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink, ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\|null given\\.$#" + count: 1 + path: src/Api/Store/StoreResource.php + + - + message: "#^Parameter \\#1 \\$link of class ShoppingFeed\\\\Sdk\\\\Api\\\\Task\\\\TicketDomain constructor expects ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink, ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\|null given\\.$#" + count: 1 + path: src/Api/Store/StoreResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Task\\\\TicketDomain\\:\\:getByBatch\\(\\) has parameter \\$filters with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Api/Task/TicketDomain.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Api\\\\Task\\\\TicketDomain\\:\\:getByBatch\\(\\) should return iterable\\&Traversable but returns ShoppingFeed\\\\Sdk\\\\Resource\\\\PaginatedResourceIterator\\|null\\.$#" + count: 1 + path: src/Api/Task/TicketDomain.php + + - + message: "#^Cannot call method getProperty\\(\\) on ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource\\|null\\.$#" + count: 1 + path: src/Client/Client.php + + - + message: "#^Strict comparison using \\=\\=\\= between null and ShoppingFeed\\\\Sdk\\\\Http\\\\Adapter\\\\AdapterInterface will always evaluate to false\\.$#" + count: 1 + path: src/Client/Client.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Client\\\\ClientOptions\\:\\:addHeaders\\(\\) has parameter \\$headers with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Client/ClientOptions.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Client\\\\ClientOptions\\:\\:getBaseUri\\(\\) should return string but returns bool\\.$#" + count: 1 + path: src/Client/ClientOptions.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Client\\\\ClientOptions\\:\\:getHeaders\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Client/ClientOptions.php + + - + message: "#^Property ShoppingFeed\\\\Sdk\\\\Client\\\\ClientOptions\\:\\:\\$baseUri \\(bool\\) does not accept default value of type string\\.$#" + count: 1 + path: src/Client/ClientOptions.php + + - + message: "#^Property ShoppingFeed\\\\Sdk\\\\Client\\\\ClientOptions\\:\\:\\$baseUri \\(bool\\) does not accept string\\.$#" + count: 1 + path: src/Client/ClientOptions.php + + - + message: "#^Property ShoppingFeed\\\\Sdk\\\\Client\\\\ClientOptions\\:\\:\\$headers type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Client/ClientOptions.php + + - + message: "#^Parameter \\#1 \\$response of method ShoppingFeed\\\\Sdk\\\\Credential\\\\Password\\:\\:tokenizeResponse\\(\\) expects ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource, ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource\\|null given\\.$#" + count: 1 + path: src/Credential/Password.php + + - + message: "#^Parameter \\#1 \\$resource of class ShoppingFeed\\\\Sdk\\\\Api\\\\Session\\\\SessionResource constructor expects ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource, ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource\\|null given\\.$#" + count: 1 + path: src/Credential/Token.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalClient\\:\\:__construct\\(\\) has parameter \\$baseUri with no type specified\\.$#" + count: 1 + path: src/Hal/HalClient.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalClient\\:\\:batchSend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalClient.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalClient\\:\\:batchSend\\(\\) has parameter \\$requests with no type specified\\.$#" + count: 1 + path: src/Hal/HalClient.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalClient\\:\\:createRequest\\(\\) has parameter \\$headers with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalClient.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalClient\\:\\:request\\(\\) has parameter \\$method with no type specified\\.$#" + count: 1 + path: src/Hal/HalClient.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalClient\\:\\:request\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalClient.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalClient\\:\\:request\\(\\) has parameter \\$uri with no type specified\\.$#" + count: 1 + path: src/Hal/HalClient.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalClient\\:\\:send\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalClient.php + + - + message: "#^PHPDoc tag @param has invalid value \\(\\$method\\)\\: Unexpected token \"\\$method\", expected type at offset 18$#" + count: 1 + path: src/Hal/HalClient.php + + - + message: "#^PHPDoc tag @param has invalid value \\(\\$options\\)\\: Unexpected token \"\\$options\", expected type at offset 59$#" + count: 1 + path: src/Hal/HalClient.php + + - + message: "#^PHPDoc tag @param has invalid value \\(\\$requests\\)\\: Unexpected token \"\\$requests\", expected type at offset 24$#" + count: 1 + path: src/Hal/HalClient.php + + - + message: "#^PHPDoc tag @param has invalid value \\(\\$uri\\)\\: Unexpected token \"\\$uri\", expected type at offset 40$#" + count: 1 + path: src/Hal/HalClient.php + + - + message: "#^Parameter \\#4 \\$body of method ShoppingFeed\\\\Sdk\\\\Http\\\\Adapter\\\\AdapterInterface\\:\\:createRequest\\(\\) expects null, string\\|null given\\.$#" + count: 1 + path: src/Hal/HalClient.php + + - + message: "#^Unreachable statement \\- code above always terminates\\.$#" + count: 1 + path: src/Hal/HalClient.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\:\\:__construct\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\:\\:__construct\\(\\) has parameter \\$href with no type specified\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\:\\:batchSend\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\:\\:batchSend\\(\\) has parameter \\$requests with no type specified\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\:\\:createRequest\\(\\) has parameter \\$headers with no type specified\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\:\\:createRequest\\(\\) has parameter \\$variables with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\:\\:delete\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\:\\:delete\\(\\) has parameter \\$variables with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\:\\:get\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\:\\:get\\(\\) has parameter \\$variables with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\:\\:getUri\\(\\) has parameter \\$variables with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\:\\:patch\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\:\\:patch\\(\\) has parameter \\$variables with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\:\\:post\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\:\\:post\\(\\) has parameter \\$variables with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\:\\:put\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\:\\:put\\(\\) has parameter \\$variables with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\:\\:send\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\:\\:withAddedHref\\(\\) has parameter \\$path with no type specified\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\:\\:withAddedHref\\(\\) has parameter \\$variables with no type specified\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^PHPDoc tag @param has invalid value \\(\\$href\\)\\: Unexpected token \"\\$href\", expected type at offset 60$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^PHPDoc tag @param has invalid value \\(\\$path\\)\\: Unexpected token \"\\$path\", expected type at offset 18$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^PHPDoc tag @param has invalid value \\(\\$requests\\)\\: Unexpected token \"\\$requests\", expected type at offset 27$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^PHPDoc tag @param has invalid value \\(\\$variables\\)\\: Unexpected token \"\\$variables\", expected type at offset 38$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Parameter \\#1 \\$function of function call_user_func expects callable\\(\\)\\: mixed, \\(callable\\(\\)\\: mixed\\)\\|null given\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Parameter \\#1 \\$request of method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalClient\\:\\:send\\(\\) expects Psr\\\\Http\\\\Message\\\\RequestInterface, array\\\\|Psr\\\\Http\\\\Message\\\\RequestInterface given\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Parameter \\#1 \\$str of function rtrim expects string, array\\\\|string\\|null given\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Parameter \\#2 \\$uri of method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalClient\\:\\:createRequest\\(\\) expects string, array\\\\|string\\|null given\\.$#" + count: 1 + path: src/Hal/HalLink.php + + - + message: "#^Unsafe access to private property ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\:\\:\\$uriTemplate through static\\:\\:\\.$#" + count: 3 + path: src/Hal/HalLink.php + + - + message: "#^Cannot call method get\\(\\) on ShoppingFeed\\\\Sdk\\\\Hal\\\\HalLink\\|null\\.$#" + count: 1 + path: src/Hal/HalResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource\\:\\:__construct\\(\\) has parameter \\$embedded with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource\\:\\:__construct\\(\\) has parameter \\$links with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource\\:\\:__construct\\(\\) has parameter \\$properties with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource\\:\\:createEmbedded\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Hal/HalResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource\\:\\:createEmbedded\\(\\) has parameter \\$relations with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource\\:\\:createLinks\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Hal/HalResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource\\:\\:createLinks\\(\\) has parameter \\$links with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource\\:\\:fromArray\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource\\:\\:get\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource\\:\\:getProperties\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource\\:\\:getProperty\\(\\) has parameter \\$name with no type specified\\.$#" + count: 1 + path: src/Hal/HalResource.php + + - + message: "#^PHPDoc tag @param has invalid value \\(\\$name\\)\\: Unexpected token \"\\$name\", expected type at offset 23$#" + count: 1 + path: src/Hal/HalResource.php + + - + message: "#^Property ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource\\:\\:\\$embedded type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalResource.php + + - + message: "#^Property ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource\\:\\:\\$links type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalResource.php + + - + message: "#^Property ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource\\:\\:\\$properties type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Hal/HalResource.php + + - + message: "#^Unsafe usage of new static\\(\\)\\.$#" + count: 1 + path: src/Hal/HalResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Http\\\\Adapter\\\\AdapterInterface\\:\\:batchSend\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Http/Adapter/AdapterInterface.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Http\\\\Adapter\\\\AdapterInterface\\:\\:batchSend\\(\\) has parameter \\$requests with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Http/Adapter/AdapterInterface.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Http\\\\Adapter\\\\AdapterInterface\\:\\:createRequest\\(\\) has parameter \\$headers with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Http/Adapter/AdapterInterface.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Http\\\\Adapter\\\\AdapterInterface\\:\\:request\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Http/Adapter/AdapterInterface.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Http\\\\Adapter\\\\AdapterInterface\\:\\:send\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Http/Adapter/AdapterInterface.php + + - + message: "#^If condition is always true\\.$#" + count: 1 + path: src/Http/Adapter/GuzzleHTTPAdapter.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Http\\\\Adapter\\\\GuzzleHTTPAdapter\\:\\:batchSend\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Http/Adapter/GuzzleHTTPAdapter.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Http\\\\Adapter\\\\GuzzleHTTPAdapter\\:\\:batchSend\\(\\) has parameter \\$requests with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Http/Adapter/GuzzleHTTPAdapter.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Http\\\\Adapter\\\\GuzzleHTTPAdapter\\:\\:checkDependency\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Http/Adapter/GuzzleHTTPAdapter.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Http\\\\Adapter\\\\GuzzleHTTPAdapter\\:\\:createRequest\\(\\) has parameter \\$headers with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Http/Adapter/GuzzleHTTPAdapter.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Http\\\\Adapter\\\\GuzzleHTTPAdapter\\:\\:initClient\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Http/Adapter/GuzzleHTTPAdapter.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Http\\\\Adapter\\\\GuzzleHTTPAdapter\\:\\:request\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Http/Adapter/GuzzleHTTPAdapter.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Http\\\\Adapter\\\\GuzzleHTTPAdapter\\:\\:send\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Http/Adapter/GuzzleHTTPAdapter.php + + - + message: "#^Parameter \\#1 \\$elements of class GuzzleHttp\\\\Psr7\\\\MultipartStream constructor expects array, null given\\.$#" + count: 1 + path: src/Http/Adapter/GuzzleHTTPAdapter.php + + - + message: "#^Parameter \\#1 \\$response of method ShoppingFeed\\\\Sdk\\\\Hal\\\\HalClient\\:\\:createResource\\(\\) expects Psr\\\\Http\\\\Message\\\\ResponseInterface, Psr\\\\Http\\\\Message\\\\ResponseInterface\\|null given\\.$#" + count: 1 + path: src/Http/Adapter/GuzzleHTTPAdapter.php + + - + message: "#^Right side of && is always false\\.$#" + count: 1 + path: src/Http/Adapter/GuzzleHTTPAdapter.php + + - + message: "#^Property ShoppingFeed\\\\Sdk\\\\Http\\\\Middleware\\\\RateLimitHandler\\:\\:\\$logger \\(Psr\\\\Log\\\\LoggerInterface\\) does not accept Psr\\\\Log\\\\LoggerInterface\\|null\\.$#" + count: 1 + path: src/Http/Middleware/RateLimitHandler.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Http\\\\Middleware\\\\ServerErrorHandler\\:\\:__construct\\(\\) has parameter \\$maxRetries with no type specified\\.$#" + count: 1 + path: src/Http/Middleware/ServerErrorHandler.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Http\\\\UriTemplate\\:\\:expand\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Http/UriTemplate.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Http\\\\UriTemplate\\:\\:expand\\(\\) has parameter \\$template with no type specified\\.$#" + count: 1 + path: src/Http/UriTemplate.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Http\\\\UriTemplate\\:\\:expand\\(\\) has parameter \\$variables with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Http/UriTemplate.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Http\\\\UriTemplate\\:\\:expandMatch\\(\\) has parameter \\$matches with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Http/UriTemplate.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Http\\\\UriTemplate\\:\\:isAssoc\\(\\) has parameter \\$array with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Http/UriTemplate.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Http\\\\UriTemplate\\:\\:parseExpression\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Http/UriTemplate.php + + - + message: "#^Property ShoppingFeed\\\\Sdk\\\\Http\\\\UriTemplate\\:\\:\\$delims type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Http/UriTemplate.php + + - + message: "#^Property ShoppingFeed\\\\Sdk\\\\Http\\\\UriTemplate\\:\\:\\$delimsPct type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Http/UriTemplate.php + + - + message: "#^Property ShoppingFeed\\\\Sdk\\\\Http\\\\UriTemplate\\:\\:\\$operatorHash type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Http/UriTemplate.php + + - + message: "#^Property ShoppingFeed\\\\Sdk\\\\Http\\\\UriTemplate\\:\\:\\$variables type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Http/UriTemplate.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Operation\\\\AbstractBulkOperation\\:\\:eachBatch\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Operation/AbstractBulkOperation.php + + - + message: "#^Parameter \\#2 \\$size of function array_chunk expects int\\<1, max\\>, int given\\.$#" + count: 1 + path: src/Operation/AbstractBulkOperation.php + + - + message: "#^Property ShoppingFeed\\\\Sdk\\\\Operation\\\\AbstractBulkOperation\\:\\:\\$operations type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Operation/AbstractBulkOperation.php + + - + message: "#^Class ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractCollection implements generic interface IteratorAggregate but does not specify its types\\: TKey, TValue$#" + count: 1 + path: src/Resource/AbstractCollection.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractCollection\\:\\:__construct\\(\\) has parameter \\$resources with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Resource/AbstractCollection.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractCollection\\:\\:addResources\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Resource/AbstractCollection.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractCollection\\:\\:addResources\\(\\) has parameter \\$resources with no value type specified in iterable type iterable\\.$#" + count: 1 + path: src/Resource/AbstractCollection.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractCollection\\:\\:getIterator\\(\\) return type has no value type specified in iterable type Traversable\\.$#" + count: 1 + path: src/Resource/AbstractCollection.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractCollection\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Resource/AbstractCollection.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractCollection\\:\\:merge\\(\\) has parameter \\$collection with no value type specified in iterable type ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractCollection\\.$#" + count: 1 + path: src/Resource/AbstractCollection.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractCollection\\:\\:merge\\(\\) return type has no value type specified in iterable type static\\(ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractCollection\\)\\.$#" + count: 1 + path: src/Resource/AbstractCollection.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractCollection\\:\\:toArray\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Resource/AbstractCollection.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractDomainResource\\:\\:createIterator\\(\\) should return ShoppingFeed\\\\Sdk\\\\Resource\\\\PaginatedResourceIterator\\|null but returns object\\.$#" + count: 1 + path: src/Resource/AbstractDomainResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractDomainResource\\:\\:createPaginator\\(\\) should return ShoppingFeed\\\\Sdk\\\\Resource\\\\PaginatedResourceCollection\\|null but returns object\\.$#" + count: 1 + path: src/Resource/AbstractDomainResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractDomainResource\\:\\:getAll\\(\\) has parameter \\$filters with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Resource/AbstractDomainResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractDomainResource\\:\\:getAll\\(\\) should return iterable\\&Traversable but returns ShoppingFeed\\\\Sdk\\\\Resource\\\\PaginatedResourceIterator\\|null\\.$#" + count: 1 + path: src/Resource/AbstractDomainResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractDomainResource\\:\\:getOne\\(\\) should return ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractResource but returns object\\.$#" + count: 1 + path: src/Resource/AbstractDomainResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractDomainResource\\:\\:getPage\\(\\) has parameter \\$criteria with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Resource/AbstractDomainResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractDomainResource\\:\\:getPage\\(\\) should return ShoppingFeed\\\\Sdk\\\\Resource\\\\PaginatedResourceCollection but returns ShoppingFeed\\\\Sdk\\\\Resource\\\\PaginatedResourceCollection\\|null\\.$#" + count: 1 + path: src/Resource/AbstractDomainResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractDomainResource\\:\\:getPages\\(\\) has parameter \\$criteria with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Resource/AbstractDomainResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractResource\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Resource/AbstractResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractResource\\:\\:propertyMatch\\(\\) has parameter \\$value with no type specified\\.$#" + count: 1 + path: src/Resource/AbstractResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractResource\\:\\:toArray\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Resource/AbstractResource.php + + - + message: "#^PHPDoc tag @param has invalid value \\(\\$value\\)\\: Unexpected token \"\\$value\", expected type at offset 56$#" + count: 1 + path: src/Resource/AbstractResource.php + + - + message: "#^Property ShoppingFeed\\\\Sdk\\\\Resource\\\\AbstractResource\\:\\:\\$resource \\(ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource\\) does not accept ShoppingFeed\\\\Sdk\\\\Hal\\\\HalResource\\|null\\.$#" + count: 1 + path: src/Resource/AbstractResource.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\Json\\:\\:decode\\(\\) has parameter \\$assoc with no type specified\\.$#" + count: 1 + path: src/Resource/Json.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\Json\\:\\:encode\\(\\) has parameter \\$content with no type specified\\.$#" + count: 1 + path: src/Resource/Json.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\Json\\:\\:encode\\(\\) should return string but returns string\\|false\\.$#" + count: 1 + path: src/Resource/Json.php + + - + message: "#^PHPDoc tag @param has invalid value \\(\\$content\\)\\: Unexpected token \"\\$content\", expected type at offset 96$#" + count: 1 + path: src/Resource/Json.php + + - + message: "#^Class ShoppingFeed\\\\Sdk\\\\Resource\\\\PaginatedResourceCollection implements generic interface IteratorAggregate but does not specify its types\\: TKey, TValue$#" + count: 1 + path: src/Resource/PaginatedResourceCollection.php + + - + message: "#^Unreachable statement \\- code above always terminates\\.$#" + count: 1 + path: src/Resource/PaginatedResourceCollection.php + + - + message: "#^Unsafe usage of new static\\(\\)\\.$#" + count: 1 + path: src/Resource/PaginatedResourceCollection.php + + - + message: "#^Class ShoppingFeed\\\\Sdk\\\\Resource\\\\PaginatedResourceIterator implements generic interface IteratorAggregate but does not specify its types\\: TKey, TValue$#" + count: 1 + path: src/Resource/PaginatedResourceIterator.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\PaginatedResourceIterator\\:\\:getMeta\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Resource/PaginatedResourceIterator.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\PaginatedResourceIterator\\:\\:getMeta\\(\\) has parameter \\$name with no type specified\\.$#" + count: 1 + path: src/Resource/PaginatedResourceIterator.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\PaginatedResourceIterator\\:\\:refresh\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Resource/PaginatedResourceIterator.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\PaginationCriteria\\:\\:__construct\\(\\) has parameter \\$criteria with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Resource/PaginationCriteria.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\PaginationCriteria\\:\\:getFilters\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Resource/PaginationCriteria.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\PaginationCriteria\\:\\:getQueryParams\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Resource/PaginationCriteria.php + + - + message: "#^Property ShoppingFeed\\\\Sdk\\\\Resource\\\\PaginationCriteria\\:\\:\\$filters type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Resource/PaginationCriteria.php + + - + message: "#^Class ShoppingFeed\\\\Sdk\\\\Resource\\\\ResourceProperties implements generic interface ArrayAccess but does not specify its types\\: TKey, TValue$#" + count: 1 + path: src/Resource/ResourceProperties.php + + - + message: "#^Method ShoppingFeed\\\\Sdk\\\\Resource\\\\ResourceProperties\\:\\:__construct\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Resource/ResourceProperties.php + + - + message: "#^Property ShoppingFeed\\\\Sdk\\\\Resource\\\\ResourceProperties\\:\\:\\$data has no type specified\\.$#" + count: 1 + path: src/Resource/ResourceProperties.php + diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..4c03673 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,8 @@ +includes: + - phpstan-baseline.neon +parameters: + paths: + - src + level: 8 + excludePaths: + - project/tests From a939f6a9d996d8f32d2e11b56e1a2366ac009389 Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 13 Nov 2024 14:47:02 +0100 Subject: [PATCH 02/15] Fix phpstan version --- .github/workflows/php.yml | 11 +---------- composer.json | 2 +- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 99b07da..0f0dfa5 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -25,17 +25,8 @@ jobs: - name: Validate composer.json and composer.lock run: composer validate - - name: Cache Composer packages - id: composer-cache - uses: actions/cache@v2 - with: - path: vendor - key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-php- - - name: Install dependencies - run: composer install --prefer-dist --no-progress --no-suggest + run: composer install --prefer-dist --no-progress - name: Run test suite run: composer run-script test diff --git a/composer.json b/composer.json index f825cc8..eaa3645 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "phpunit/phpunit": "^7.0 | ^9.0", "shoppingfeed/coding-style-php": "~2.1.0", "overtrue/phplint": "^1.1", - "phpstan/phpstan": "^1.4" + "phpstan/phpstan": "~1.4.0" }, "scripts": { "test": [ From af133f3caa978bf7b2a62bde1ce394093786d71c Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 13 Nov 2024 14:54:00 +0100 Subject: [PATCH 03/15] Replace run-script usage --- .github/workflows/php.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 0f0dfa5..0ef313f 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -29,4 +29,4 @@ jobs: run: composer install --prefer-dist --no-progress - name: Run test suite - run: composer run-script test + run: composer test From 0240520b3755ebb753baf0706de0c5f736dd0a3a Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 13 Nov 2024 14:58:11 +0100 Subject: [PATCH 04/15] Remove phpstan from CI --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index eaa3645..4d9d8de 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,6 @@ "scripts": { "test": [ "@tests-unit", - "@phpstan", "@phpcs" ], "tests-unit": "vendor/bin/phpunit", From ca36ef47c22a281ca15d48c7208196e86a09550a Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 13 Nov 2024 15:08:48 +0100 Subject: [PATCH 05/15] Try to fix CI --- composer.json | 1 + phpstan.neon | 1 + 2 files changed, 2 insertions(+) diff --git a/composer.json b/composer.json index 4d9d8de..eaa3645 100644 --- a/composer.json +++ b/composer.json @@ -30,6 +30,7 @@ "scripts": { "test": [ "@tests-unit", + "@phpstan", "@phpcs" ], "tests-unit": "vendor/bin/phpunit", diff --git a/phpstan.neon b/phpstan.neon index 4c03673..bb1d59f 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -4,5 +4,6 @@ parameters: paths: - src level: 8 + phpVersion: 70100 excludePaths: - project/tests From 5008fa2b5fe127db82feab6df3311b68ebbbdbb0 Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 13 Nov 2024 15:15:39 +0100 Subject: [PATCH 06/15] Try to fix CI --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index eaa3645..a874fce 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ "tests-unit": "vendor/bin/phpunit", "phpcs": "vendor/bin/sfcs src --progress -vvv", "phpcsfix": "vendor/bin/sfcs src --progress -vvv --autofix", - "phpstan": "vendor/bin/phpstan analyse" + "phpstan": "vendor/bin/phpstan analyse --no-progress" }, "scripts-descriptions": { "test" : "Run PHPUnit tests suites and Coding standards validator" From 6cfc641d5f900129533d9184beb7fd4cc3e82cbf Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 13 Nov 2024 15:21:16 +0100 Subject: [PATCH 07/15] Try to fix CI --- composer.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index a874fce..f21dff7 100644 --- a/composer.json +++ b/composer.json @@ -30,13 +30,12 @@ "scripts": { "test": [ "@tests-unit", - "@phpstan", - "@phpcs" + "@phpstan" ], "tests-unit": "vendor/bin/phpunit", "phpcs": "vendor/bin/sfcs src --progress -vvv", "phpcsfix": "vendor/bin/sfcs src --progress -vvv --autofix", - "phpstan": "vendor/bin/phpstan analyse --no-progress" + "phpstan": "vendor/bin/phpstan analyse" }, "scripts-descriptions": { "test" : "Run PHPUnit tests suites and Coding standards validator" From eef978d3e2eff47c1887e88acefe84e0c349e45e Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 13 Nov 2024 15:22:54 +0100 Subject: [PATCH 08/15] Try to fix CI --- .github/workflows/php.yml | 2 +- composer.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 0ef313f..c7f4a46 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - phpv: [ "7.1", "8.0", "8.1", "8.2", "8.3" ] + phpv: [ "7.1" ] steps: - uses: actions/checkout@v4 diff --git a/composer.json b/composer.json index f21dff7..eaa3645 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,8 @@ "scripts": { "test": [ "@tests-unit", - "@phpstan" + "@phpstan", + "@phpcs" ], "tests-unit": "vendor/bin/phpunit", "phpcs": "vendor/bin/sfcs src --progress -vvv", From b49a96e13ea66363b676d4e1bdbcf366ec75016e Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 13 Nov 2024 15:24:58 +0100 Subject: [PATCH 09/15] Try to fix CI --- .github/workflows/php.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index c7f4a46..2bd6160 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - phpv: [ "7.1" ] + phpv: [ "7.1", "8.0" ] steps: - uses: actions/checkout@v4 From 833b5f76ab373d66d539e346092c8a46654b8bad Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 13 Nov 2024 15:32:16 +0100 Subject: [PATCH 10/15] Do not check guzzle version in code (rely on composer) --- phpstan-baseline.neon | 10 ---------- src/Http/Adapter/GuzzleHTTPAdapter.php | 19 ------------------- 2 files changed, 29 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 4188a3a..aad98ad 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -730,11 +730,6 @@ parameters: count: 1 path: src/Http/Adapter/GuzzleHTTPAdapter.php - - - message: "#^Method ShoppingFeed\\\\Sdk\\\\Http\\\\Adapter\\\\GuzzleHTTPAdapter\\:\\:checkDependency\\(\\) has no return type specified\\.$#" - count: 1 - path: src/Http/Adapter/GuzzleHTTPAdapter.php - - message: "#^Method ShoppingFeed\\\\Sdk\\\\Http\\\\Adapter\\\\GuzzleHTTPAdapter\\:\\:createRequest\\(\\) has parameter \\$headers with no value type specified in iterable type array\\.$#" count: 1 @@ -765,11 +760,6 @@ parameters: count: 1 path: src/Http/Adapter/GuzzleHTTPAdapter.php - - - message: "#^Right side of && is always false\\.$#" - count: 1 - path: src/Http/Adapter/GuzzleHTTPAdapter.php - - message: "#^Property ShoppingFeed\\\\Sdk\\\\Http\\\\Middleware\\\\RateLimitHandler\\:\\:\\$logger \\(Psr\\\\Log\\\\LoggerInterface\\) does not accept Psr\\\\Log\\\\LoggerInterface\\|null\\.$#" count: 1 diff --git a/src/Http/Adapter/GuzzleHTTPAdapter.php b/src/Http/Adapter/GuzzleHTTPAdapter.php index 21201f1..5e1099b 100644 --- a/src/Http/Adapter/GuzzleHTTPAdapter.php +++ b/src/Http/Adapter/GuzzleHTTPAdapter.php @@ -38,8 +38,6 @@ public function __construct( GuzzleHttp\HandlerStack $stack = null ) { - $this->checkDependency(); - $this->options = $options ?: new Client\ClientOptions(); $this->stack = $stack ?: $this->createHandlerStack(); @@ -132,23 +130,6 @@ private function createExceptionCallback(callable $callback = null) }; } - /** - * Check for Guzzle 6 accessibility and version - * - * @throws Http\Exception\MissingDependencyException - */ - private function checkDependency() - { - if (! interface_exists(GuzzleHttp\ClientInterface::class) - || (defined('\GuzzleHttp\ClientInterface::VERSION') - && version_compare(GuzzleHttp\ClientInterface::VERSION, '7', '>=')) - ) { - throw new Http\Exception\MissingDependencyException( - 'No GuzzleHttp client v6 found, please install the dependency or add your own http adapter' - ); - } - } - /** * Initialise Http Client */ From 6ae4888f39f669d9eb9276bde1c05b7c2c40e53b Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 13 Nov 2024 15:33:46 +0100 Subject: [PATCH 11/15] Restore php 8.1 in CI --- .github/workflows/php.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 2bd6160..283002e 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - phpv: [ "7.1", "8.0" ] + phpv: [ "7.1", "8.0", "8.1" ] steps: - uses: actions/checkout@v4 From a15e968e9c7584f8bb516c7b52b7645d875f97e0 Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 13 Nov 2024 15:34:44 +0100 Subject: [PATCH 12/15] Restore php 8.2 in CI --- .github/workflows/php.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 283002e..a21ddee 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - phpv: [ "7.1", "8.0", "8.1" ] + phpv: [ "7.1", "8.0", "8.1", "8.2" ] steps: - uses: actions/checkout@v4 From 3ae79926247362533458f0ea8e76391fc5318bf0 Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 13 Nov 2024 15:37:22 +0100 Subject: [PATCH 13/15] Restore php 8.3 in CI --- .github/workflows/php.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index a21ddee..0ef313f 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - phpv: [ "7.1", "8.0", "8.1", "8.2" ] + phpv: [ "7.1", "8.0", "8.1", "8.2", "8.3" ] steps: - uses: actions/checkout@v4 From b4bce1f657b418acacaaf16b2ae477b81dcfbc57 Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 13 Nov 2024 15:46:37 +0100 Subject: [PATCH 14/15] Do not force phpVersion in phpstan check --- phpstan.neon | 1 - 1 file changed, 1 deletion(-) diff --git a/phpstan.neon b/phpstan.neon index bb1d59f..4c03673 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -4,6 +4,5 @@ parameters: paths: - src level: 8 - phpVersion: 70100 excludePaths: - project/tests From b83e6400367fa65ec841eaf616673248276b4fcb Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 13 Nov 2024 15:48:19 +0100 Subject: [PATCH 15/15] Force php version again --- phpstan.neon | 1 + 1 file changed, 1 insertion(+) diff --git a/phpstan.neon b/phpstan.neon index 4c03673..bb1d59f 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -4,5 +4,6 @@ parameters: paths: - src level: 8 + phpVersion: 70100 excludePaths: - project/tests