@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * file that was distributed with this source code. |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | |
14 | 14 | namespace Sylius\Bundle\GridBundle\DependencyInjection; |
15 | 15 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | public function load(array $config, ContainerBuilder $container): void |
30 | 30 | { |
31 | 31 | $config = $this->processConfiguration($this->getConfiguration([], $container), $config); |
32 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
32 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
33 | 33 | |
34 | 34 | $loader->load('services.xml'); |
35 | 35 |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * file that was distributed with this source code. |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | |
14 | 14 | namespace Sylius\Bundle\GridBundle\Doctrine\PHPCRODM; |
15 | 15 | |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | */ |
166 | 166 | public function orderBy(string $field, string $direction) |
167 | 167 | { |
168 | - $this->orderBys = [ $field => $direction ]; |
|
168 | + $this->orderBys = [$field => $direction]; |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | /** |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Sylius\Bundle\GridBundle\Doctrine\PHPCRODM; |
6 | 6 |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * file that was distributed with this source code. |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | |
14 | 14 | namespace Sylius\Bundle\GridBundle\Doctrine\ORM; |
15 | 15 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $parameterName = $this->getParameterName($field); |
68 | 68 | $this->queryBuilder->setParameter($parameterName, $value); |
69 | 69 | |
70 | - return $this->queryBuilder->expr()->eq($this->getFieldName($field), ':'.$parameterName); |
|
70 | + return $this->queryBuilder->expr()->eq($this->getFieldName($field), ':' . $parameterName); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | /** |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $parameterName = $this->getParameterName($field); |
79 | 79 | $this->queryBuilder->setParameter($parameterName, $value); |
80 | 80 | |
81 | - return $this->queryBuilder->expr()->neq($this->getFieldName($field), ':'.$parameterName); |
|
81 | + return $this->queryBuilder->expr()->neq($this->getFieldName($field), ':' . $parameterName); |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | /** |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $parameterName = $this->getParameterName($field); |
90 | 90 | $this->queryBuilder->setParameter($parameterName, $value); |
91 | 91 | |
92 | - $this->queryBuilder->andWhere($this->getFieldName($field).' < :'.$parameterName); |
|
92 | + $this->queryBuilder->andWhere($this->getFieldName($field) . ' < :' . $parameterName); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | /** |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $parameterName = $this->getParameterName($field); |
101 | 101 | $this->queryBuilder->setParameter($parameterName, $value); |
102 | 102 | |
103 | - $this->queryBuilder->andWhere($this->getFieldName($field).' <= :'.$parameterName); |
|
103 | + $this->queryBuilder->andWhere($this->getFieldName($field) . ' <= :' . $parameterName); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $parameterName = $this->getParameterName($field); |
112 | 112 | $this->queryBuilder->setParameter($parameterName, $value); |
113 | 113 | |
114 | - $this->queryBuilder->andWhere($this->getFieldName($field).' > :'.$parameterName); |
|
114 | + $this->queryBuilder->andWhere($this->getFieldName($field) . ' > :' . $parameterName); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | /** |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | $parameterName = $this->getParameterName($field); |
123 | 123 | $this->queryBuilder->setParameter($parameterName, $value); |
124 | 124 | |
125 | - $this->queryBuilder->andWhere($this->getFieldName($field).' >= :'.$parameterName); |
|
125 | + $this->queryBuilder->andWhere($this->getFieldName($field) . ' >= :' . $parameterName); |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | /** |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | private function getFieldName(string $field): string |
198 | 198 | { |
199 | 199 | if (false === strpos($field, '.')) { |
200 | - return $this->queryBuilder->getRootAlias().'.'.$field; |
|
200 | + return $this->queryBuilder->getRootAlias() . '.' . $field; |
|
201 | 201 | } |
202 | 202 | |
203 | 203 | return $field; |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * file that was distributed with this source code. |
10 | 10 | */ |
11 | 11 | |
12 | -declare(strict_types=1); |
|
12 | +declare(strict_types = 1); |
|
13 | 13 | |
14 | 14 | namespace Sylius\Bundle\GridBundle\Doctrine\DBAL; |
15 | 15 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | { |
66 | 66 | $this->queryBuilder->setParameter($field, $value); |
67 | 67 | |
68 | - return $this->queryBuilder->expr()->eq($field, ':'.$field); |
|
68 | + return $this->queryBuilder->expr()->eq($field, ':' . $field); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | { |
76 | 76 | $this->queryBuilder->setParameter($field, $value); |
77 | 77 | |
78 | - return $this->queryBuilder->expr()->neq($field, ':'.$field); |
|
78 | + return $this->queryBuilder->expr()->neq($field, ':' . $field); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | /** |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | */ |
84 | 84 | public function lessThan(string $field, $value) |
85 | 85 | { |
86 | - $this->queryBuilder->andWhere($field.' < :'.$field)->setParameter($field, $value); |
|
86 | + $this->queryBuilder->andWhere($field . ' < :' . $field)->setParameter($field, $value); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | public function lessThanOrEqual(string $field, $value) |
93 | 93 | { |
94 | - $this->queryBuilder->andWhere($field.' =< :'.$field)->setParameter($field, $value); |
|
94 | + $this->queryBuilder->andWhere($field . ' =< :' . $field)->setParameter($field, $value); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | */ |
100 | 100 | public function greaterThan(string $field, $value) |
101 | 101 | { |
102 | - $this->queryBuilder->andWhere($field.' > :'.$field)->setParameter($field, $value); |
|
102 | + $this->queryBuilder->andWhere($field . ' > :' . $field)->setParameter($field, $value); |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | /** |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | */ |
108 | 108 | public function greaterThanOrEqual(string $field, $value) |
109 | 109 | { |
110 | - $this->queryBuilder->andWhere($field.' => :%s'.$field)->setParameter($field, $value); |
|
110 | + $this->queryBuilder->andWhere($field . ' => :%s' . $field)->setParameter($field, $value); |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | /** |
@@ -43,7 +43,7 @@ |
||
43 | 43 | */ |
44 | 44 | public function registerContainerConfiguration(LoaderInterface $loader): void |
45 | 45 | { |
46 | - $loader->load(__DIR__.'/config/config.yml'); |
|
46 | + $loader->load(__DIR__ . '/config/config.yml'); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
@@ -13,9 +13,7 @@ discard block |
||
13 | 13 | |
14 | 14 | namespace Sylius\Bundle\OrderBundle\Controller; |
15 | 15 | |
16 | -use Doctrine\ORM\EntityManager; |
|
17 | 16 | use FOS\RestBundle\View\View; |
18 | -use Payum\Core\Registry\RegistryInterface; |
|
19 | 17 | use Sylius\Bundle\ResourceBundle\Controller\RequestConfiguration; |
20 | 18 | use Sylius\Bundle\ResourceBundle\Controller\ResourceController; |
21 | 19 | use Sylius\Component\Core\Repository\OrderRepositoryInterface; |
@@ -25,11 +23,9 @@ discard block |
||
25 | 23 | use Sylius\Component\Resource\ResourceActions; |
26 | 24 | use Symfony\Component\EventDispatcher\EventDispatcherInterface; |
27 | 25 | use Symfony\Component\EventDispatcher\GenericEvent; |
28 | -use Symfony\Component\HttpFoundation\RedirectResponse; |
|
29 | 26 | use Symfony\Component\HttpFoundation\Request; |
30 | 27 | use Symfony\Component\HttpFoundation\Response; |
31 | 28 | use Symfony\Component\HttpKernel\Exception\HttpException; |
32 | -use Webmozart\Assert\Assert; |
|
33 | 29 | |
34 | 30 | class OrderController extends ResourceController |
35 | 31 | { |
@@ -22,6 +22,7 @@ |
||
22 | 22 | { |
23 | 23 | /** |
24 | 24 | * @param OrderInterface $order |
25 | + * @return void |
|
25 | 26 | */ |
26 | 27 | public function assignNumber(OrderInterface $order): void; |
27 | 28 | } |
@@ -35,6 +35,7 @@ |
||
35 | 35 | * @param AttributeValueInterface $attributeValue |
36 | 36 | * @param ExecutionContextInterface $context |
37 | 37 | * @param array $configuration |
38 | + * @return void |
|
38 | 39 | */ |
39 | 40 | public function validate( |
40 | 41 | AttributeValueInterface $attributeValue, |