@@ -105,12 +105,12 @@ |
||
105 | 105 | } |
106 | 106 | |
107 | 107 | /** |
108 | - * @param ChannelInterface $channel |
|
108 | + * @param ChannelInterface $channel |
|
109 | 109 | * |
110 | 110 | * @return string |
111 | 111 | */ |
112 | 112 | private function getChannelUrl(ChannelInterface $channel) |
113 | 113 | { |
114 | - return '/api/v1/channels/' . $channel->getCode(); |
|
114 | + return '/api/v1/channels/' . $channel->getCode(); |
|
115 | 115 | } |
116 | 116 | } |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | } |
152 | 152 | } |
153 | 153 | } |
154 | -EOT; |
|
154 | +eot; |
|
155 | 155 | |
156 | 156 | $this->client->request('POST', '/api/v1/products/', [], [], static::$authorizedHeaderWithContentType, $data); |
157 | 157 | |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | } |
193 | 193 | } |
194 | 194 | } |
195 | -EOT; |
|
195 | +eot; |
|
196 | 196 | $this->client->request('PUT', $this->getProductUrl($product), [], [], static::$authorizedHeaderWithContentType, $data); |
197 | 197 | $response = $this->client->getResponse(); |
198 | 198 | |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | } |
219 | 219 | } |
220 | 220 | } |
221 | -EOT; |
|
221 | +eot; |
|
222 | 222 | $this->client->request('PATCH', $this->getProductUrl($product), [], [], static::$authorizedHeaderWithContentType, $data); |
223 | 223 | $response = $this->client->getResponse(); |
224 | 224 | $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | } |
277 | 277 | } |
278 | 278 | } |
279 | -EOT; |
|
279 | +eot; |
|
280 | 280 | |
281 | 281 | $this->client->request('POST', '/api/v1/products/', [], [], static::$authorizedHeaderWithContentType, $data); |
282 | 282 | |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | } |
306 | 306 | } |
307 | 307 | } |
308 | -EOT; |
|
308 | +eot; |
|
309 | 309 | |
310 | 310 | $this->client->request('POST', '/api/v1/products/', [], [], static::$authorizedHeaderWithContentType, $data); |
311 | 311 | |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | }, |
335 | 335 | "productTaxons": "category,mugs" |
336 | 336 | } |
337 | -EOT; |
|
337 | +eot; |
|
338 | 338 | |
339 | 339 | $this->client->request('POST', '/api/v1/products/', [], [], static::$authorizedHeaderWithContentType, $data); |
340 | 340 | |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | } |
366 | 366 | } |
367 | 367 | } |
368 | -EOT; |
|
368 | +eot; |
|
369 | 369 | |
370 | 370 | $this->client->request('POST', '/api/v1/products/', [], [], static::$authorizedHeaderWithContentType, $data); |
371 | 371 | |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | } |
406 | 406 | } |
407 | 407 | } |
408 | -EOT; |
|
408 | +eot; |
|
409 | 409 | |
410 | 410 | $this->client->request('POST', '/api/v1/products/', [], [], static::$authorizedHeaderWithContentType, $data); |
411 | 411 | |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | } |
441 | 441 | } |
442 | 442 | } |
443 | -EOT; |
|
443 | +eot; |
|
444 | 444 | |
445 | 445 | $this->client->request( |
446 | 446 | 'POST', |
@@ -483,7 +483,7 @@ discard block |
||
483 | 483 | } |
484 | 484 | } |
485 | 485 | } |
486 | -EOT; |
|
486 | +eot; |
|
487 | 487 | |
488 | 488 | $this->client->request('POST', '/api/v1/products/', [], [], static::$authorizedHeaderWithContentType, $data); |
489 | 489 |
@@ -182,7 +182,7 @@ |
||
182 | 182 | { |
183 | 183 | $this->loadFixturesFromFile('authentication/api_administrator.yml'); |
184 | 184 | $taxCategories = $this->loadFixturesFromFile('resources/tax_categories.yml'); |
185 | - $taxCategory = $taxCategories['tax_category_1']; |
|
185 | + $taxCategory = $taxCategories['tax_category_1']; |
|
186 | 186 | |
187 | 187 | $this->client->request('GET', $this->getTaxCategoryUrl($taxCategory), [], [], [ |
188 | 188 | 'HTTP_Authorization' => 'Bearer SampleTokenNjZkNjY2MDEwMTAzMDkxMGE0OTlhYzU3NzYyMTE0ZGQ3ODcyMDAwM2EwMDZjNDI5NDlhMDdlMQ', |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | "name": "Clothing", |
63 | 63 | "description": "All items classified as clothing." |
64 | 64 | } |
65 | -EOT; |
|
65 | +eot; |
|
66 | 66 | |
67 | 67 | $this->client->request('POST', '/api/v1/tax-categories/', [], [], [ |
68 | 68 | 'HTTP_Authorization' => 'Bearer SampleTokenNjZkNjY2MDEwMTAzMDkxMGE0OTlhYzU3NzYyMTE0ZGQ3ODcyMDAwM2EwMDZjNDI5NDlhMDdlMQ', |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | "name": "Clothing & Accessories", |
254 | 254 | "description": "All items classified as clothing with accessories." |
255 | 255 | } |
256 | -EOT; |
|
256 | +eot; |
|
257 | 257 | |
258 | 258 | $this->client->request('PUT', $this->getTaxCategoryUrl($taxCategory), [], [], [ |
259 | 259 | 'HTTP_Authorization' => 'Bearer SampleTokenNjZkNjY2MDEwMTAzMDkxMGE0OTlhYzU3NzYyMTE0ZGQ3ODcyMDAwM2EwMDZjNDI5NDlhMDdlMQ', |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | { |
295 | 295 | "name": "Clothing & Accessories" |
296 | 296 | } |
297 | -EOT; |
|
297 | +eot; |
|
298 | 298 | |
299 | 299 | $this->client->request('PATCH', $this->getTaxCategoryUrl($taxCategory), [], [], [ |
300 | 300 | 'HTTP_Authorization' => 'Bearer SampleTokenNjZkNjY2MDEwMTAzMDkxMGE0OTlhYzU3NzYyMTE0ZGQ3ODcyMDAwM2EwMDZjNDI5NDlhMDdlMQ', |
@@ -11,9 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | namespace Sylius\Bundle\OrderBundle\Controller; |
13 | 13 | |
14 | -use Doctrine\ORM\EntityManager; |
|
15 | 14 | use FOS\RestBundle\View\View; |
16 | -use Payum\Core\Registry\RegistryInterface; |
|
17 | 15 | use Sylius\Bundle\ResourceBundle\Controller\RequestConfiguration; |
18 | 16 | use Sylius\Bundle\ResourceBundle\Controller\ResourceController; |
19 | 17 | use Sylius\Component\Core\Repository\OrderRepositoryInterface; |
@@ -27,7 +25,6 @@ discard block |
||
27 | 25 | use Symfony\Component\HttpFoundation\Request; |
28 | 26 | use Symfony\Component\HttpFoundation\Response; |
29 | 27 | use Symfony\Component\HttpKernel\Exception\HttpException; |
30 | -use Webmozart\Assert\Assert; |
|
31 | 28 | |
32 | 29 | class OrderController extends ResourceController |
33 | 30 | { |
@@ -50,7 +50,7 @@ |
||
50 | 50 | |
51 | 51 | /** |
52 | 52 | * @param mixed $subjects |
53 | - * @param array|string[] $associationsPaths |
|
53 | + * @param string[] $associationsPaths |
|
54 | 54 | */ |
55 | 55 | public function hydrateAssociations($subjects, array $associationsPaths) |
56 | 56 | { |
@@ -13,7 +13,6 @@ |
||
13 | 13 | |
14 | 14 | use Sylius\Component\Channel\Context\ChannelContextInterface; |
15 | 15 | use Sylius\Component\Channel\Context\ChannelNotFoundException; |
16 | -use Sylius\Component\Core\Model\OrderInterface; |
|
17 | 16 | use Sylius\Component\Core\Repository\OrderRepositoryInterface; |
18 | 17 | use Sylius\Component\Order\Context\CartContextInterface; |
19 | 18 | use Sylius\Component\Order\Context\CartNotFoundException; |
@@ -23,18 +23,21 @@ |
||
23 | 23 | * @param RequestConfiguration $requestConfiguration |
24 | 24 | * @param string $actionName |
25 | 25 | * @param ResourceInterface|null $resource |
26 | + * @return void |
|
26 | 27 | */ |
27 | 28 | public function addSuccessFlash(RequestConfiguration $requestConfiguration, $actionName, ResourceInterface $resource = null); |
28 | 29 | |
29 | 30 | /** |
30 | 31 | * @param RequestConfiguration $requestConfiguration |
31 | 32 | * @param string $actionName |
33 | + * @return void |
|
32 | 34 | */ |
33 | 35 | public function addErrorFlash(RequestConfiguration $requestConfiguration, $actionName); |
34 | 36 | |
35 | 37 | /** |
36 | 38 | * @param RequestConfiguration $requestConfiguration |
37 | 39 | * @param ResourceControllerEvent $event |
40 | + * @return void |
|
38 | 41 | */ |
39 | 42 | public function addFlashFromEvent(RequestConfiguration $requestConfiguration, ResourceControllerEvent $event); |
40 | 43 | } |
@@ -23,6 +23,7 @@ |
||
23 | 23 | * @param ResourceInterface $resource |
24 | 24 | * @param RequestConfiguration $requestConfiguration |
25 | 25 | * @param ObjectManager $manager |
26 | + * @return void |
|
26 | 27 | */ |
27 | 28 | public function handle( |
28 | 29 | ResourceInterface $resource, |
@@ -25,8 +25,8 @@ |
||
25 | 25 | use Sylius\Bundle\ResourceBundle\Controller\RequestConfigurationFactoryInterface; |
26 | 26 | use Sylius\Bundle\ResourceBundle\Controller\ResourceController; |
27 | 27 | use Sylius\Bundle\ResourceBundle\Controller\ResourceFormFactoryInterface; |
28 | -use Sylius\Bundle\ResourceBundle\Controller\ResourcesCollectionProviderInterface; |
|
29 | 28 | use Sylius\Bundle\ResourceBundle\Controller\ResourceUpdateHandlerInterface; |
29 | +use Sylius\Bundle\ResourceBundle\Controller\ResourcesCollectionProviderInterface; |
|
30 | 30 | use Sylius\Bundle\ResourceBundle\Controller\SingleResourceProviderInterface; |
31 | 31 | use Sylius\Bundle\ResourceBundle\Controller\StateMachineInterface; |
32 | 32 | use Sylius\Bundle\ResourceBundle\Controller\ViewHandlerInterface; |