@@ -78,7 +78,7 @@ |
||
78 | 78 | if (!empty($criteria['shippingAddress'])) { |
79 | 79 | $queryBuilder |
80 | 80 | ->andWhere('address.lastName LIKE :shippingAddress') |
81 | - ->setParameter('shippingAddress', '%'.$criteria['shippingAddress'].'%') |
|
81 | + ->setParameter('shippingAddress', '%' . $criteria['shippingAddress'] . '%') |
|
82 | 82 | ; |
83 | 83 | } |
84 | 84 | if (!empty($criteria['createdAtFrom'])) { |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | { |
322 | 322 | $groupBy = ''; |
323 | 323 | foreach ($configuration['groupBy'] as $groupByArray) { |
324 | - $groupBy = $groupByArray.'(date)'.' '.$groupBy; |
|
324 | + $groupBy = $groupByArray . '(date)' . ' ' . $groupBy; |
|
325 | 325 | } |
326 | 326 | $groupBy = substr($groupBy, 0, -1); |
327 | 327 | $groupBy = str_replace(' ', ', ', $groupBy); |
@@ -339,9 +339,9 @@ discard block |
||
339 | 339 | ->orderBy($groupBy) |
340 | 340 | ; |
341 | 341 | |
342 | - $baseCurrencyCode = $configuration['baseCurrency'] ? 'in '.$configuration['baseCurrency']->getCode() : ''; |
|
342 | + $baseCurrencyCode = $configuration['baseCurrency'] ? 'in ' . $configuration['baseCurrency']->getCode() : ''; |
|
343 | 343 | $queryBuilder |
344 | - ->select('DATE(o.completed_at) as date', 'TRUNCATE(SUM(o.total * o.exchange_rate)/ 100,2) as "total sum '.$baseCurrencyCode.'"') |
|
344 | + ->select('DATE(o.completed_at) as date', 'TRUNCATE(SUM(o.total * o.exchange_rate)/ 100,2) as "total sum ' . $baseCurrencyCode . '"') |
|
345 | 345 | ; |
346 | 346 | |
347 | 347 | return $queryBuilder |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | $groupBy = ''; |
359 | 359 | |
360 | 360 | foreach ($configuration['groupBy'] as $groupByElement) { |
361 | - $groupBy = $groupByElement.'(date)'.' '.$groupBy; |
|
361 | + $groupBy = $groupByElement . '(date)' . ' ' . $groupBy; |
|
362 | 362 | } |
363 | 363 | |
364 | 364 | $groupBy = substr($groupBy, 0, -1); |
@@ -64,7 +64,7 @@ |
||
64 | 64 | public function load(array $config, ContainerBuilder $container) |
65 | 65 | { |
66 | 66 | $config = $this->processConfiguration($this->getConfiguration($config, $container), $config); |
67 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
67 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
68 | 68 | |
69 | 69 | $this->registerResources('sylius', $config['driver'], $config['resources'], $container); |
70 | 70 |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | */ |
190 | 190 | private function getFieldValue($entity, $fieldName) |
191 | 191 | { |
192 | - return $entity->{'get'.ucfirst($fieldName)}(); |
|
192 | + return $entity->{'get' . ucfirst($fieldName)}(); |
|
193 | 193 | } |
194 | 194 | |
195 | 195 | /** |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | } |
208 | 208 | $defaults = ['_sylius_entity' => $entity, $fieldName => $value]; |
209 | 209 | |
210 | - return new Route($this->routeConfigs[$className]['prefix'].'/'.$value, $defaults); |
|
210 | + return new Route($this->routeConfigs[$className]['prefix'] . '/' . $value, $defaults); |
|
211 | 211 | } |
212 | 212 | |
213 | 213 | /** |
@@ -55,7 +55,7 @@ |
||
55 | 55 | public function validate($entity, Constraint $constraint) |
56 | 56 | { |
57 | 57 | if (!$constraint instanceof HasEnabledEntity) { |
58 | - throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\HasEnabledEntity'); |
|
58 | + throw new UnexpectedTypeException($constraint, __NAMESPACE__ . '\HasEnabledEntity'); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | $enabled = $this->accessor->getValue($entity, $constraint->enabledPath); |
@@ -144,9 +144,9 @@ discard block |
||
144 | 144 | { |
145 | 145 | $rootDir = $this->getRootDir(); |
146 | 146 | |
147 | - $loader->load($rootDir.'/config/config_'.$this->environment.'.yml'); |
|
147 | + $loader->load($rootDir . '/config/config_' . $this->environment . '.yml'); |
|
148 | 148 | |
149 | - if (is_file($file = $rootDir.'/config/config_'.$this->environment.'.local.yml')) { |
|
149 | + if (is_file($file = $rootDir . '/config/config_' . $this->environment . '.local.yml')) { |
|
150 | 150 | $loader->load($file); |
151 | 151 | } |
152 | 152 | } |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | public function getCacheDir() |
158 | 158 | { |
159 | 159 | if ($this->isVagrantEnvironment()) { |
160 | - return '/dev/shm/sylius/cache/'.$this->environment; |
|
160 | + return '/dev/shm/sylius/cache/' . $this->environment; |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | return parent::getCacheDir(); |
@@ -34,14 +34,14 @@ |
||
34 | 34 | $contactBlock->setParentDocument($parent); |
35 | 35 | $contactBlock->setName('contact'); |
36 | 36 | $contactBlock->setTitle('Contact us'); |
37 | - $contactBlock->setBody('<p>Call us '.$this->faker->phoneNumber.'!</p><p>'.$this->faker->paragraph.'</p>'); |
|
37 | + $contactBlock->setBody('<p>Call us ' . $this->faker->phoneNumber . '!</p><p>' . $this->faker->paragraph . '</p>'); |
|
38 | 38 | |
39 | 39 | $manager->persist($contactBlock); |
40 | 40 | |
41 | 41 | for ($i = 1; $i <= 3; ++$i) { |
42 | 42 | $block = $factory->createNew(); |
43 | 43 | $block->setParentDocument($parent); |
44 | - $block->setName('block-'.$i); |
|
44 | + $block->setName('block-' . $i); |
|
45 | 45 | $block->setTitle(ucfirst($this->faker->word)); |
46 | 46 | $block->setBody($this->faker->paragraph); |
47 | 47 |
@@ -72,13 +72,13 @@ |
||
72 | 72 | } |
73 | 73 | |
74 | 74 | foreach ($options as $option) { |
75 | - $archetype->addOption($this->getReference('Sylius.Option.'.$option)); |
|
75 | + $archetype->addOption($this->getReference('Sylius.Option.' . $option)); |
|
76 | 76 | } |
77 | 77 | foreach ($properties as $attribute) { |
78 | - $archetype->addAttribute($this->getReference('Sylius.Attribute.'.$attribute)); |
|
78 | + $archetype->addAttribute($this->getReference('Sylius.Attribute.' . $attribute)); |
|
79 | 79 | } |
80 | 80 | |
81 | - $this->setReference('Sylius.Archetype.'.$code, $archetype); |
|
81 | + $this->setReference('Sylius.Archetype.' . $code, $archetype); |
|
82 | 82 | |
83 | 83 | return $archetype; |
84 | 84 | } |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | |
119 | 119 | $this->generateVariants($product); |
120 | 120 | |
121 | - $this->setReference('Sylius.Product.'.$i, $product); |
|
121 | + $this->setReference('Sylius.Product.' . $i, $product); |
|
122 | 122 | |
123 | 123 | return $product; |
124 | 124 | } |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | |
163 | 163 | $this->generateVariants($product); |
164 | 164 | |
165 | - $this->setReference('Sylius.Product.'.$i, $product); |
|
165 | + $this->setReference('Sylius.Product.' . $i, $product); |
|
166 | 166 | |
167 | 167 | return $product; |
168 | 168 | } |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | |
200 | 200 | $this->generateVariants($product); |
201 | 201 | |
202 | - $this->setReference('Sylius.Product.'.$i, $product); |
|
202 | + $this->setReference('Sylius.Product.' . $i, $product); |
|
203 | 203 | |
204 | 204 | return $product; |
205 | 205 | } |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | $this->addAttribute($product, 'book_isbn', $isbn); |
237 | 237 | $this->addAttribute($product, 'book_pages', $this->faker->randomNumber(3)); |
238 | 238 | |
239 | - $this->setReference('Sylius.Product.'.$i, $product); |
|
239 | + $this->setReference('Sylius.Product.' . $i, $product); |
|
240 | 240 | |
241 | 241 | return $product; |
242 | 242 | } |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | $variant->setCode($this->getUniqueCode()); |
260 | 260 | $variant->setOnHand($this->faker->randomNumber(1)); |
261 | 261 | |
262 | - $this->setReference('Sylius.Variant-'.$this->totalVariants, $variant); |
|
262 | + $this->setReference('Sylius.Variant-' . $this->totalVariants, $variant); |
|
263 | 263 | |
264 | 264 | ++$this->totalVariants; |
265 | 265 | } |
@@ -281,12 +281,12 @@ discard block |
||
281 | 281 | $variant->setTaxCategory($this->getTaxCategory('taxable')); |
282 | 282 | |
283 | 283 | $mainTaxon = $product->getMainTaxon(); |
284 | - $image = clone $this->getReference('Sylius.Image.'.$mainTaxon->getCode()); |
|
284 | + $image = clone $this->getReference('Sylius.Image.' . $mainTaxon->getCode()); |
|
285 | 285 | $variant->addImage($image); |
286 | 286 | |
287 | 287 | $product->addVariant($variant); |
288 | 288 | |
289 | - $this->setReference('Sylius.Variant-'.$this->totalVariants, $variant); |
|
289 | + $this->setReference('Sylius.Variant-' . $this->totalVariants, $variant); |
|
290 | 290 | |
291 | 291 | ++$this->totalVariants; |
292 | 292 | } |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | { |
303 | 303 | /* @var $attribute AttributeValueInterface */ |
304 | 304 | $attribute = $this->getProductAttributeValueFactory()->createNew(); |
305 | - $attribute->setAttribute($this->getReference('Sylius.Attribute.'.$code)); |
|
305 | + $attribute->setAttribute($this->getReference('Sylius.Attribute.' . $code)); |
|
306 | 306 | $attribute->setProduct($product); |
307 | 307 | $attribute->setValue($value); |
308 | 308 | |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | $taxons = new ArrayCollection(); |
321 | 321 | |
322 | 322 | foreach ($taxonCodes as $taxonCode) { |
323 | - $taxons->add($this->getReference('Sylius.Taxon.'.$taxonCode)); |
|
323 | + $taxons->add($this->getReference('Sylius.Taxon.' . $taxonCode)); |
|
324 | 324 | } |
325 | 325 | |
326 | 326 | $product->setTaxons($taxons); |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | protected function setChannels(ProductInterface $product, array $channelCodes) |
336 | 336 | { |
337 | 337 | foreach ($channelCodes as $code) { |
338 | - $product->addChannel($this->getReference('Sylius.Channel.'.$code)); |
|
338 | + $product->addChannel($this->getReference('Sylius.Channel.' . $code)); |
|
339 | 339 | } |
340 | 340 | } |
341 | 341 | |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | */ |
347 | 347 | protected function getTaxCategory($code) |
348 | 348 | { |
349 | - return $this->getReference('Sylius.TaxCategory.'.$code); |
|
349 | + return $this->getReference('Sylius.TaxCategory.' . $code); |
|
350 | 350 | } |
351 | 351 | |
352 | 352 | /** |