@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | public function load(array $config, ContainerBuilder $container) |
| 29 | 29 | { |
| 30 | 30 | $config = $this->processConfiguration($this->getConfiguration($config, $container), $config); |
| 31 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 31 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 32 | 32 | |
| 33 | 33 | $loader->load('services.xml'); |
| 34 | 34 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | public function prepend(ContainerBuilder $container) |
| 42 | 42 | { |
| 43 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/driver')); |
|
| 43 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config/driver')); |
|
| 44 | 44 | |
| 45 | 45 | $extensionsNamesToConfigurationFiles = [ |
| 46 | 46 | 'doctrine' => 'doctrine/orm.xml', |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | { |
| 61 | 61 | /** @var ChoiceView $choice */ |
| 62 | 62 | foreach ($view->vars['choices'] as $choice) { |
| 63 | - $choice->label = str_repeat('— ', $choice->data->getLevel()).$choice->label; |
|
| 63 | + $choice->label = str_repeat('— ', $choice->data->getLevel()) . $choice->label; |
|
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | /** @var TaxonInterface $choice */ |
| 75 | 75 | foreach ($choices as $choice) { |
| 76 | 76 | $result[] = new ChoiceView( |
| 77 | - str_repeat('-', $level).' '.$choice->getName(), |
|
| 77 | + str_repeat('-', $level) . ' ' . $choice->getName(), |
|
| 78 | 78 | $choice->getId(), |
| 79 | 79 | $choice, |
| 80 | 80 | [] |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | if (!empty($criteria['billingAddress'])) { |
| 68 | 68 | $queryBuilder |
| 69 | 69 | ->andWhere($queryBuilder->expr()->like('address.lastName', ':billingAddress')) |
| 70 | - ->setParameter('billingAddress', '%'.$criteria['billingAddress'].'%') |
|
| 70 | + ->setParameter('billingAddress', '%' . $criteria['billingAddress'] . '%') |
|
| 71 | 71 | ; |
| 72 | 72 | } |
| 73 | 73 | if (!empty($criteria['createdAtFrom'])) { |
@@ -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); |
@@ -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 | |