@@ -26,7 +26,7 @@ |
||
26 | 26 | { |
27 | 27 | function let(UserContextInterface $userContext, CustomerRepositoryInterface $customerRepository): void |
28 | 28 | { |
29 | - $this->beConstructedWith($userContext, $customerRepository); |
|
29 | + $this->beConstructedWith($userContext, $customerRepository); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | function it_supports_only_customer(): void |
@@ -45,12 +45,15 @@ |
||
45 | 45 | { |
46 | 46 | $this |
47 | 47 | ->shouldThrow(\InvalidArgumentException::class) |
48 | - ->during('validate', ['', new class() extends Constraint {}]) |
|
48 | + ->during('validate', ['', new class() extends Constraint |
|
49 | + { |
|
50 | +}]) |
|
49 | 51 | ; |
50 | 52 | } |
51 | 53 | |
52 | 54 | function it_throws_an_exception_if_constraint_does_not_type_of_order_shipping_method_eligibility(): void { |
53 | - $constraint = new class() extends Constraint implements OrderTokenValueAwareInterface { |
|
55 | + $constraint = new class() extends Constraint implements OrderTokenValueAwareInterface |
|
56 | + { |
|
54 | 57 | private $orderTokenValue; |
55 | 58 | |
56 | 59 | public function getOrderTokenValue(): ?string |
@@ -40,7 +40,9 @@ discard block |
||
40 | 40 | { |
41 | 41 | $this |
42 | 42 | ->shouldThrow(\InvalidArgumentException::class) |
43 | - ->during('validate', [new CompleteOrder(), new class() extends Constraint {}]) |
|
43 | + ->during('validate', [new CompleteOrder(), new class() extends Constraint |
|
44 | + { |
|
45 | +}]) |
|
44 | 46 | ; |
45 | 47 | } |
46 | 48 | |
@@ -48,7 +50,9 @@ discard block |
||
48 | 50 | { |
49 | 51 | $this |
50 | 52 | ->shouldThrow(\InvalidArgumentException::class) |
51 | - ->during('validate', ['', new class() extends Constraint {}]) |
|
53 | + ->during('validate', ['', new class() extends Constraint |
|
54 | + { |
|
55 | +}]) |
|
52 | 56 | ; |
53 | 57 | } |
54 | 58 |
@@ -42,12 +42,15 @@ |
||
42 | 42 | { |
43 | 43 | $this |
44 | 44 | ->shouldThrow(\InvalidArgumentException::class) |
45 | - ->during('validate', ['', new class() extends Constraint {}]) |
|
45 | + ->during('validate', ['', new class() extends Constraint |
|
46 | + { |
|
47 | +}]) |
|
46 | 48 | ; |
47 | 49 | } |
48 | 50 | |
49 | 51 | function it_throws_an_exception_if_constraint_does_not_type_of_order_shipping_method_eligibility(): void { |
50 | - $constraint = new class() extends Constraint implements OrderTokenValueAwareInterface { |
|
52 | + $constraint = new class() extends Constraint implements OrderTokenValueAwareInterface |
|
53 | + { |
|
51 | 54 | private $orderTokenValue; |
52 | 55 | |
53 | 56 | function getOrderTokenValue(): ?string |
@@ -43,7 +43,7 @@ |
||
43 | 43 | Assert::notNull($order = $this->orderRepository->findOneBy(['tokenValue' => $value->getOrderTokenValue()])); |
44 | 44 | |
45 | 45 | /** @var PaymentInterface $payment */ |
46 | - foreach($order->getPayments() as $payment) { |
|
46 | + foreach ($order->getPayments() as $payment) { |
|
47 | 47 | if (!$payment->getMethod()->isEnabled()) { |
48 | 48 | $this->context->addViolation( |
49 | 49 | $constraint->message, |
@@ -854,7 +854,7 @@ |
||
854 | 854 | } |
855 | 855 | |
856 | 856 | /** |
857 | - * @When /^I try to remove (product "[^"]+") from the (cart)$/ |
|
857 | + * @When /^I try to remove (product "[^"]+") from the (cart)$/ |
|
858 | 858 | */ |
859 | 859 | public function iTryToRemoveProductFromTheCart(ProductInterface $product, string $tokenValue): void |
860 | 860 | { |
@@ -813,7 +813,7 @@ |
||
813 | 813 | */ |
814 | 814 | public function iShouldSeeThisShippingAddressAsShippingAndBillingAddress(string $fullName, string ...$addressTypes): void |
815 | 815 | { |
816 | - foreach($addressTypes as $addressType){ |
|
816 | + foreach ($addressTypes as $addressType) { |
|
817 | 817 | $this->hasFullNameInAddress($fullName, $addressType); |
818 | 818 | } |
819 | 819 | } |
@@ -813,7 +813,7 @@ |
||
813 | 813 | */ |
814 | 814 | public function iShouldSeeThisShippingAddressAsShippingAndBillingAddress(string $fullName, string ...$addressTypes): void |
815 | 815 | { |
816 | - foreach($addressTypes as $addressType){ |
|
816 | + foreach($addressTypes as $addressType) { |
|
817 | 817 | $this->hasFullNameInAddress($fullName, $addressType); |
818 | 818 | } |
819 | 819 | } |
@@ -46,29 +46,53 @@ |
||
46 | 46 | |
47 | 47 | public function executeCustomRequest(RequestInterface $request): Response; |
48 | 48 | |
49 | + /** |
|
50 | + * @return void |
|
51 | + */ |
|
49 | 52 | public function buildCreateRequest(): void; |
50 | 53 | |
54 | + /** |
|
55 | + * @return void |
|
56 | + */ |
|
51 | 57 | public function buildUpdateRequest(string $id): void; |
52 | 58 | |
59 | + /** |
|
60 | + * @return void |
|
61 | + */ |
|
53 | 62 | public function buildUploadRequest(): void; |
54 | 63 | |
64 | + /** |
|
65 | + * @return void |
|
66 | + */ |
|
55 | 67 | public function setRequestData(array $data): void; |
56 | 68 | |
57 | - /** @param string|int $value */ |
|
69 | + /** @param string $value */ |
|
58 | 70 | public function addParameter(string $key, $value): void; |
59 | 71 | |
60 | 72 | /** @param string|int $value */ |
61 | 73 | public function addFilter(string $key, $value): void; |
62 | 74 | |
75 | + /** |
|
76 | + * @return void |
|
77 | + */ |
|
63 | 78 | public function addFile(string $key, UploadedFile $file): void; |
64 | 79 | |
65 | 80 | /** @param string|int|array $value */ |
66 | 81 | public function addRequestData(string $key, $value): void; |
67 | 82 | |
83 | + /** |
|
84 | + * @return void |
|
85 | + */ |
|
68 | 86 | public function addSubResourceData(string $key, array $data): void; |
69 | 87 | |
88 | + /** |
|
89 | + * @return void |
|
90 | + */ |
|
70 | 91 | public function removeSubResource(string $subResource, string $id): void; |
71 | 92 | |
93 | + /** |
|
94 | + * @return void |
|
95 | + */ |
|
72 | 96 | public function updateRequestData(array $data): void; |
73 | 97 | |
74 | 98 | public function getLastResponse(): Response; |
@@ -27,6 +27,9 @@ discard block |
||
27 | 27 | |
28 | 28 | public function getValue(Response $response, string $key); |
29 | 29 | |
30 | + /** |
|
31 | + * @param string $localeCode |
|
32 | + */ |
|
30 | 33 | public function getTranslationValue(Response $response, string $key, ?string $localeCode): string; |
31 | 34 | |
32 | 35 | public function getError(Response $response): string; |
@@ -46,7 +49,7 @@ discard block |
||
46 | 49 | /** @param string|int $value */ |
47 | 50 | public function hasValue(Response $response, string $key, $value): bool; |
48 | 51 | |
49 | - /** @param string|int $value */ |
|
52 | + /** @param string $value */ |
|
50 | 53 | public function hasValueInCollection(Response $response, string $key, $value): bool; |
51 | 54 | |
52 | 55 | /** @param string|int $value */ |
@@ -55,7 +58,7 @@ discard block |
||
55 | 58 | /** @param string|int $value */ |
56 | 59 | public function hasSubResourceWithValue(Response $response, string $subResource, string $key, $value): bool; |
57 | 60 | |
58 | - /** @param string|array $value */ |
|
61 | + /** @param string $value */ |
|
59 | 62 | public function hasItemOnPositionWithValue(Response $response, int $position, string $key, $value): bool; |
60 | 63 | |
61 | 64 | public function hasItemWithTranslation(Response $response, string $locale, string $key, string $translation): bool; |
@@ -132,6 +132,7 @@ |
||
132 | 132 | |
133 | 133 | /** |
134 | 134 | * @Given the store (also )allows shipping with :name |
135 | + * @param string $name |
|
135 | 136 | */ |
136 | 137 | public function theStoreAllowsShippingMethodWithName($name): void |
137 | 138 | { |