@@ -32,7 +32,7 @@ |
||
| 32 | 32 | $registry = $container->getDefinition('sylius.registry.grid_filter'); |
| 33 | 33 | |
| 34 | 34 | foreach ($container->findTaggedServiceIds('sylius.grid_filter') as $id => $attributes) { |
| 35 | - if (!isset($attributes[0]['type'])) { |
|
| 35 | + if (!isset($attributes[0]['type'])) { |
|
| 36 | 36 | throw new \InvalidArgumentException('Tagged grid filters needs to have `type` attribute.'); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | */ |
| 70 | 70 | public function getData(Parameters $parameters) |
| 71 | 71 | { |
| 72 | - $countQueryBuilderModifier = function ($queryBuilder) { |
|
| 72 | + $countQueryBuilderModifier = function($queryBuilder) { |
|
| 73 | 73 | $queryBuilder |
| 74 | 74 | ->select('COUNT(DISTINCT o.id) AS total_results') |
| 75 | 75 | ->setMaxResults(1) |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | public function getMatchers() |
| 68 | 68 | { |
| 69 | 69 | return [ |
| 70 | - 'beSameResourceGridViewAs' => function ($subject, $key) { |
|
| 70 | + 'beSameResourceGridViewAs' => function($subject, $key) { |
|
| 71 | 71 | if (!$subject instanceof ResourceGridView || !$key instanceof ResourceGridView) { |
| 72 | 72 | return false; |
| 73 | 73 | } |
@@ -82,22 +82,22 @@ |
||
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | if (in_array('create', $routesToGenerate)) { |
| 85 | - $createRoute = $this->createRoute($metadata, $configuration, $isApi ? $rootPath : $rootPath . 'new', 'create', $isApi ? ['POST'] : ['GET', 'POST'], $isApi); |
|
| 85 | + $createRoute = $this->createRoute($metadata, $configuration, $isApi ? $rootPath : $rootPath.'new', 'create', $isApi ? ['POST'] : ['GET', 'POST'], $isApi); |
|
| 86 | 86 | $routes->add($this->getRouteName($metadata, $configuration, 'create'), $createRoute); |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | if (in_array('update', $routesToGenerate)) { |
| 90 | - $updateRoute = $this->createRoute($metadata, $configuration, $isApi ? $rootPath . '{id}' : $rootPath . '{id}/edit', 'update', $isApi ? ['PUT', 'PATCH'] : ['GET', 'PUT', 'PATCH'], $isApi); |
|
| 90 | + $updateRoute = $this->createRoute($metadata, $configuration, $isApi ? $rootPath.'{id}' : $rootPath.'{id}/edit', 'update', $isApi ? ['PUT', 'PATCH'] : ['GET', 'PUT', 'PATCH'], $isApi); |
|
| 91 | 91 | $routes->add($this->getRouteName($metadata, $configuration, 'update'), $updateRoute); |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | if (in_array('show', $routesToGenerate)) { |
| 95 | - $showRoute = $this->createRoute($metadata, $configuration, $rootPath . '{id}', 'show', ['GET'], $isApi); |
|
| 95 | + $showRoute = $this->createRoute($metadata, $configuration, $rootPath.'{id}', 'show', ['GET'], $isApi); |
|
| 96 | 96 | $routes->add($this->getRouteName($metadata, $configuration, 'show'), $showRoute); |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | if (in_array('delete', $routesToGenerate)) { |
| 100 | - $deleteRoute = $this->createRoute($metadata, $configuration, $rootPath . '{id}', 'delete', ['DELETE'], $isApi); |
|
| 100 | + $deleteRoute = $this->createRoute($metadata, $configuration, $rootPath.'{id}', 'delete', ['DELETE'], $isApi); |
|
| 101 | 101 | $routes->add($this->getRouteName($metadata, $configuration, 'delete'), $deleteRoute); |
| 102 | 102 | } |
| 103 | 103 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | $registry = $container->getDefinition('sylius.registry.grid_filter'); |
| 33 | 33 | |
| 34 | 34 | foreach ($container->findTaggedServiceIds('sylius.grid_filter') as $id => $attributes) { |
| 35 | - if (!isset($attributes[0]['type'])) { |
|
| 35 | + if (!isset($attributes[0]['type'])) { |
|
| 36 | 36 | throw new \InvalidArgumentException('Tagged grid filters needs to have `type` attribute.'); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -127,12 +127,12 @@ |
||
| 127 | 127 | $this->loadFixturesFromFile('authentication/api_administrator.yml'); |
| 128 | 128 | $countries = $this->loadFixturesFromFile('resources/countries.yml'); |
| 129 | 129 | |
| 130 | - $this->client->request('DELETE', '/api/countries/' . $countries['country_NL']->getId(), [], [], static::$authorizedHeaderWithContentType, []); |
|
| 130 | + $this->client->request('DELETE', '/api/countries/'.$countries['country_NL']->getId(), [], [], static::$authorizedHeaderWithContentType, []); |
|
| 131 | 131 | |
| 132 | 132 | $response = $this->client->getResponse(); |
| 133 | 133 | $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); |
| 134 | 134 | |
| 135 | - $this->client->request('GET', '/api/countries/' . $countries['country_NL']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
| 135 | + $this->client->request('GET', '/api/countries/'.$countries['country_NL']->getId(), [], [], static::$authorizedHeaderWithAccept); |
|
| 136 | 136 | |
| 137 | 137 | $response = $this->client->getResponse(); |
| 138 | 138 | $this->assertResponse($response, 'error/not_found_response', Response::HTTP_NOT_FOUND); |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | public function getMatchers() |
| 54 | 54 | { |
| 55 | 55 | return [ |
| 56 | - 'beSameAs' => function ($subject, $key) { |
|
| 56 | + 'beSameAs' => function($subject, $key) { |
|
| 57 | 57 | if (!$subject instanceof OrderItemUnitInterface || !$key instanceof OrderItemUnitInterface) { |
| 58 | 58 | return false; |
| 59 | 59 | } |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | public function getMatchers() |
| 54 | 54 | { |
| 55 | 55 | return [ |
| 56 | - 'beSameAs' => function ($subject, $key) { |
|
| 56 | + 'beSameAs' => function($subject, $key) { |
|
| 57 | 57 | if (!$subject instanceof OrderItemUnitInterface || !$key instanceof OrderItemUnitInterface) { |
| 58 | 58 | return false; |
| 59 | 59 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | $productShowPage->tryToOpen(['product' => $product])->shouldBeCalled(); |
| 66 | 66 | $productShowPage->isOpen(['product' => $product])->willReturn(false); |
| 67 | 67 | |
| 68 | - $this->shouldThrow(NotEqualException::class)->during('iShouldBeAbleToAccessProduct',[$product]); |
|
| 68 | + $this->shouldThrow(NotEqualException::class)->during('iShouldBeAbleToAccessProduct', [$product]); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | function it_checks_if_i_am_not_able_to_access_product_page(ProductShowPageInterface $productShowPage, ProductInterface $product) |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | $productShowPage->tryToOpen(['product' => $product])->shouldBeCalled(); |
| 84 | 84 | $productShowPage->isOpen(['product' => $product])->willReturn(true); |
| 85 | 85 | |
| 86 | - $this->shouldThrow(NotEqualException::class)->during('iShouldNotBeAbleToAccessProduct',[$product]); |
|
| 86 | + $this->shouldThrow(NotEqualException::class)->during('iShouldNotBeAbleToAccessProduct', [$product]); |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | function it_deletes_a_product( |