@@ -150,10 +150,10 @@ |
||
| 150 | 150 | public function iShouldSeeTheShippingDateAs(OrderInterface $order, string $dateTime): void |
| 151 | 151 | { |
| 152 | 152 | Assert::eq( |
| 153 | - new \DateTime($this->responseChecker->getValue($this->client->show((string) $order->getShipments()->first()->getId()), 'shippedAt')), |
|
| 154 | - new \DateTime($dateTime), |
|
| 155 | - 'Shipment was shipped in different date' |
|
| 156 | - ); |
|
| 153 | + new \DateTime($this->responseChecker->getValue($this->client->show((string) $order->getShipments()->first()->getId()), 'shippedAt')), |
|
| 154 | + new \DateTime($dateTime), |
|
| 155 | + 'Shipment was shipped in different date' |
|
| 156 | + ); |
|
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | /** |
@@ -23,7 +23,6 @@ |
||
| 23 | 23 | use Sylius\Component\Core\Model\OrderInterface; |
| 24 | 24 | use Sylius\Component\Core\Model\ProductInterface; |
| 25 | 25 | use Sylius\Component\Customer\Model\CustomerInterface; |
| 26 | -use Sylius\Component\Shipping\Model\ShipmentUnitInterface; |
|
| 27 | 26 | use Sylius\Component\Shipping\ShipmentTransitions; |
| 28 | 27 | use Webmozart\Assert\Assert; |
| 29 | 28 | |
@@ -48,7 +48,8 @@ |
||
| 48 | 48 | |
| 49 | 49 | function it_throws_an_exception_if_constraint_is_not_of_expected_type(): void |
| 50 | 50 | { |
| 51 | - $this->shouldThrow(\InvalidArgumentException::class)->during('validate', ['', new class() extends Constraint { |
|
| 51 | + $this->shouldThrow(\InvalidArgumentException::class)->during('validate', ['', new class() extends Constraint |
|
| 52 | + { |
|
| 52 | 53 | }]); |
| 53 | 54 | } |
| 54 | 55 | |
@@ -44,10 +44,19 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | public function upload(): Response; |
| 46 | 46 | |
| 47 | + /** |
|
| 48 | + * @return void |
|
| 49 | + */ |
|
| 47 | 50 | public function buildCreateRequest(): void; |
| 48 | 51 | |
| 52 | + /** |
|
| 53 | + * @return void |
|
| 54 | + */ |
|
| 49 | 55 | public function buildUpdateRequest(string $id): void; |
| 50 | 56 | |
| 57 | + /** |
|
| 58 | + * @return void |
|
| 59 | + */ |
|
| 51 | 60 | public function buildUploadRequest(): void; |
| 52 | 61 | |
| 53 | 62 | /** @param string|int $value */ |
@@ -56,15 +65,27 @@ discard block |
||
| 56 | 65 | /** @param string|int $value */ |
| 57 | 66 | public function addFilter(string $key, $value): void; |
| 58 | 67 | |
| 68 | + /** |
|
| 69 | + * @return void |
|
| 70 | + */ |
|
| 59 | 71 | public function addFile(string $key, UploadedFile $file): void; |
| 60 | 72 | |
| 61 | 73 | /** @param string|int|array $value */ |
| 62 | 74 | public function addRequestData(string $key, $value): void; |
| 63 | 75 | |
| 76 | + /** |
|
| 77 | + * @return void |
|
| 78 | + */ |
|
| 64 | 79 | public function addSubResourceData(string $key, array $data): void; |
| 65 | 80 | |
| 81 | + /** |
|
| 82 | + * @return void |
|
| 83 | + */ |
|
| 66 | 84 | public function removeSubResource(string $subResource, string $id): void; |
| 67 | 85 | |
| 86 | + /** |
|
| 87 | + * @return void |
|
| 88 | + */ |
|
| 68 | 89 | public function updateRequestData(array $data): void; |
| 69 | 90 | |
| 70 | 91 | public function getLastResponse(): Response; |
@@ -41,19 +41,37 @@ |
||
| 41 | 41 | |
| 42 | 42 | public function content(): string; |
| 43 | 43 | |
| 44 | + /** |
|
| 45 | + * @return void |
|
| 46 | + */ |
|
| 44 | 47 | public function setContent(array $content): void; |
| 45 | 48 | |
| 49 | + /** |
|
| 50 | + * @return void |
|
| 51 | + */ |
|
| 46 | 52 | public function updateContent(array $newValues): void; |
| 47 | 53 | |
| 48 | 54 | public function parameters(): array; |
| 49 | 55 | |
| 56 | + /** |
|
| 57 | + * @return void |
|
| 58 | + */ |
|
| 50 | 59 | public function updateParameters(array $newParameters): void; |
| 51 | 60 | |
| 52 | 61 | public function files(): array; |
| 53 | 62 | |
| 63 | + /** |
|
| 64 | + * @return void |
|
| 65 | + */ |
|
| 54 | 66 | public function updateFiles(array $newFiles): void; |
| 55 | 67 | |
| 68 | + /** |
|
| 69 | + * @return void |
|
| 70 | + */ |
|
| 56 | 71 | public function addSubResource(string $key, array $subResource): void; |
| 57 | 72 | |
| 73 | + /** |
|
| 74 | + * @return void |
|
| 75 | + */ |
|
| 58 | 76 | public function removeSubResource(string $subResource, string $id): void; |
| 59 | 77 | } |
@@ -17,5 +17,8 @@ |
||
| 17 | 17 | |
| 18 | 18 | interface UserContextInterface |
| 19 | 19 | { |
| 20 | + /** |
|
| 21 | + * @return null|UserInterface |
|
| 22 | + */ |
|
| 20 | 23 | public function getUser(): ?UserInterface; |
| 21 | 24 | } |
@@ -17,5 +17,5 @@ |
||
| 17 | 17 | |
| 18 | 18 | interface UserContextInterface |
| 19 | 19 | { |
| 20 | - public function getUser(): ?UserInterface; |
|
| 20 | + public function getUser(): ?UserInterface; |
|
| 21 | 21 | } |
@@ -19,11 +19,8 @@ |
||
| 19 | 19 | use Sylius\Component\Core\Model\ChannelInterface; |
| 20 | 20 | use Sylius\Component\Core\Model\ProductInterface; |
| 21 | 21 | use Sylius\Component\Core\Model\TaxonInterface; |
| 22 | -use Sylius\Component\Customer\Context\CustomerContextInterface; |
|
| 23 | 22 | use Sylius\Component\Taxonomy\Repository\TaxonRepositoryInterface; |
| 24 | 23 | use Sylius\Component\User\Model\UserInterface; |
| 25 | -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; |
|
| 26 | -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; |
|
| 27 | 24 | |
| 28 | 25 | final class TaxonCollectionDataProviderSpec extends ObjectBehavior |
| 29 | 26 | { |
@@ -164,6 +164,9 @@ |
||
| 164 | 164 | ; |
| 165 | 165 | } |
| 166 | 166 | |
| 167 | + /** |
|
| 168 | + * @param FactoryInterface|null $couponFactory |
|
| 169 | + */ |
|
| 167 | 170 | private static function getCouponNormalizer (?FactoryInterface $couponFactory): \Closure |
| 168 | 171 | { |
| 169 | 172 | return function (Options $options, array $couponDefinitions) use ($couponFactory): array { |
@@ -164,9 +164,9 @@ |
||
| 164 | 164 | ; |
| 165 | 165 | } |
| 166 | 166 | |
| 167 | - private static function getCouponNormalizer (?FactoryInterface $couponFactory): \Closure |
|
| 167 | + private static function getCouponNormalizer(?FactoryInterface $couponFactory): \Closure |
|
| 168 | 168 | { |
| 169 | - return function (Options $options, array $couponDefinitions) use ($couponFactory): array { |
|
| 169 | + return function (Options $options, array $couponDefinitions) use ($couponFactory) : array { |
|
| 170 | 170 | if (null === $couponFactory) { |
| 171 | 171 | throw new \RuntimeException('You must configure a $couponFactory'); |
| 172 | 172 | } |