diff --git a/src/App/Cart/Service/CartCalculationService.php b/src/App/Cart/Service/CartCalculationService.php index cd84f880a..fec30c6fa 100644 --- a/src/App/Cart/Service/CartCalculationService.php +++ b/src/App/Cart/Service/CartCalculationService.php @@ -117,9 +117,14 @@ protected function hasDeliveryOptions(PdkCart $cart): bool return $anyItemIsDeliverable && ! $deliveryOptionsDisabled; } + /** + * @param null|string $cc + * + * @return bool + */ private function allowMailboxToCountry(?string $cc): bool { - if ($cc === null) { + if (null === $cc) { return false; } diff --git a/tests/Bootstrap/MockPdkAuditRepository.php b/tests/Bootstrap/MockPdkAuditRepository.php index 13695c993..b9a1f4f5c 100644 --- a/tests/Bootstrap/MockPdkAuditRepository.php +++ b/tests/Bootstrap/MockPdkAuditRepository.php @@ -46,10 +46,7 @@ public function retrieve(string $key, ?callable $callback = null, bool $force = * * @return void */ - public function save(string $key, $data): void - { - return; - } + public function save(string $key, $data): void { } /** * @param \MyParcelNL\Pdk\Audit\Model\Audit $audit diff --git a/tests/Integration/Context/Concern/ValidatesValues.php b/tests/Integration/Context/Concern/ValidatesValues.php index 43849e980..902a91a4d 100644 --- a/tests/Integration/Context/Concern/ValidatesValues.php +++ b/tests/Integration/Context/Concern/ValidatesValues.php @@ -38,9 +38,6 @@ protected function getMatchers(): array */ protected function validateByCurrentFirstOrLast(string $value, array $body, string $key): void { - $type = Str::before($value, '_'); - $entity = Str::after($value, "{$type}_"); - $actualValue = Arr::get($body, $key); $this->validateByType($value, $key, $actualValue); diff --git a/tests/Mocks/MockTraitModel.php b/tests/Mocks/MockTraitModel.php index 4113d1171..2780e380a 100644 --- a/tests/Mocks/MockTraitModel.php +++ b/tests/Mocks/MockTraitModel.php @@ -9,6 +9,4 @@ class MockTraitModel extends Model { use MockHasCatsTrait; - - protected $attributes = []; } diff --git a/tests/Unit/App/Action/Backend/Order/UpdateOrderStatusActionTest.php b/tests/Unit/App/Action/Backend/Order/UpdateOrderStatusActionTest.php index 8bcab5c6d..04ec1c2f9 100644 --- a/tests/Unit/App/Action/Backend/Order/UpdateOrderStatusActionTest.php +++ b/tests/Unit/App/Action/Backend/Order/UpdateOrderStatusActionTest.php @@ -49,7 +49,7 @@ ->and($response->getStatusCode()) ->toBe(204); - if ($result === null) { + if (null === $result) { expect($updates)->toBeEmpty(); } else { expect($updates)->toBe([ diff --git a/tests/Unit/App/Order/Calculator/General/CustomsDeclarationCalculatorTest.php b/tests/Unit/App/Order/Calculator/General/CustomsDeclarationCalculatorTest.php index 149e4f470..8b80ff213 100644 --- a/tests/Unit/App/Order/Calculator/General/CustomsDeclarationCalculatorTest.php +++ b/tests/Unit/App/Order/Calculator/General/CustomsDeclarationCalculatorTest.php @@ -38,7 +38,7 @@ $service = Pdk::get(PdkOrderOptionsServiceInterface::class); $newOrder = $service->calculate($order); - if ($expectation === null) { + if (null === $expectation) { expect($newOrder->customsDeclaration)->toBeNull(); } else { expect($newOrder->customsDeclaration->toArrayWithoutNull())->toEqual($expectation); diff --git a/tests/Unit/App/Webhook/Hook/ShopWebhookTest.php b/tests/Unit/App/Webhook/Hook/ShopWebhookTest.php index ae62976e8..2f785f730 100644 --- a/tests/Unit/App/Webhook/Hook/ShopWebhookTest.php +++ b/tests/Unit/App/Webhook/Hook/ShopWebhookTest.php @@ -148,7 +148,7 @@ 'level' => 'debug', 'message' => '[PDK]: Webhook processed', 'context' => ['hook' => $expectedClass], - ], $logs->toArray()) + ], $logs->toArray(), true) ) ->toBeTrue(); })->with([ diff --git a/tests/Unit/Audit/Collection/AuditCollectionTest.php b/tests/Unit/Audit/Collection/AuditCollectionTest.php index 3265cf4fa..8fa264ceb 100644 --- a/tests/Unit/Audit/Collection/AuditCollectionTest.php +++ b/tests/Unit/Audit/Collection/AuditCollectionTest.php @@ -1,4 +1,5 @@