Completed
Branch master (429264)
by Kamil
37:02
created
src/Sylius/Bundle/SearchBundle/Twig/SearchElementExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
             'getsearchresultsnippet' => new \Twig_SimpleFunction('getSearchResultSnippet', function ($object) {
28 28
                 $pathArray = explode('\\', get_class($object));
29 29
 
30
-                return 'SyliusSearchBundle:SearchResultSnippets:'.lcfirst(array_pop($pathArray)).'.html.twig';
30
+                return 'SyliusSearchBundle:SearchResultSnippets:' . lcfirst(array_pop($pathArray)) . '.html.twig';
31 31
             }),
32 32
         ];
33 33
     }
Please login to merge, or discard this patch.
src/Sylius/Bundle/SearchBundle/Indexer/OrmIndexer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     private function addToOutput($message)
79 79
     {
80
-        $this->output .= $message.PHP_EOL;
80
+        $this->output .= $message . PHP_EOL;
81 81
     }
82 82
 
83 83
     /**
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     {
123 123
         $fieldNames = array_keys($fields);
124 124
         foreach ($fieldNames as &$value) {
125
-            $value = 'u.'.$value;
125
+            $value = 'u.' . $value;
126 126
         }
127 127
 
128 128
         $this->addToOutput(sprintf('Populating index table with "%s" data', $entity));
@@ -241,10 +241,10 @@  discard block
 block discarded – undo
241 241
         // TODO maybe I can use the property accessor here
242 242
         $content = '';
243 243
         foreach (array_keys(array_slice($fields, 1)) as $field) {
244
-            $func = 'get'.ucfirst($field);
244
+            $func = 'get' . ucfirst($field);
245 245
 
246 246
             if (method_exists($element, $func)) {
247
-                $content .= $element->$func().self::SPACER;
247
+                $content .= $element->$func() . self::SPACER;
248 248
             }
249 249
         }
250 250
 
Please login to merge, or discard this patch.
src/Sylius/Bundle/SearchBundle/Behat/SearchContext.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
         $crawler = new Crawler($html);
49 49
 
50
-        $element = $crawler->filter('#'.$id)->first();
50
+        $element = $crawler->filter('#' . $id)->first();
51 51
 
52 52
         $element->addHtmlContent('checked');
53 53
     }
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             ->select('u')
66 66
             ->from(SearchIndex::class, 'u')
67 67
             ->where('u.value LIKE :id')
68
-            ->setParameter('id', '%'.$id.'%')
68
+            ->setParameter('id', '%' . $id . '%')
69 69
             ->getQuery()
70 70
         ;
71 71
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
             ->select('u')
94 94
             ->from(SearchIndex::class, 'u')
95 95
             ->where('u.value LIKE :id')
96
-            ->setParameter('id', '%'.$id.'%')
96
+            ->setParameter('id', '%' . $id . '%')
97 97
             ->getQuery()
98 98
         ;
99 99
 
Please login to merge, or discard this patch.
src/Sylius/Bundle/SearchBundle/Finder/ElasticsearchFinder.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
         }
331 331
 
332 332
         foreach ($facets as &$facet) {
333
-            $facet = array_filter($facet, function($v){
333
+            $facet = array_filter($facet, function ($v) {
334 334
                 return $v["doc_count"] != 0;
335 335
             });
336 336
         }
@@ -385,29 +385,29 @@  discard block
 block discarded – undo
385 385
         foreach ($configuration['filters']['facets'] as $name => $facet) {
386 386
             // terms facet creation
387 387
             if ($facet['type'] === 'terms') {
388
-                ${$name.'AggregationFilter'} = new Filter($name);
388
+                ${$name . 'AggregationFilter'} = new Filter($name);
389 389
 
390
-                ${$name.'Aggregation'} = new AggregationTerms($name);
391
-                ${$name.'Aggregation'}->setField($name);
392
-                ${$name.'Aggregation'}->setSize(550);
390
+                ${$name . 'Aggregation'} = new AggregationTerms($name);
391
+                ${$name . 'Aggregation'}->setField($name);
392
+                ${$name . 'Aggregation'}->setSize(550);
393 393
 
394
-                ${$name.'AggregationFilter'}->addAggregation(${$name.'Aggregation'});
394
+                ${$name . 'AggregationFilter'}->addAggregation(${$name . 'Aggregation'});
395 395
             } // range facet creation
396 396
             elseif ('range' === $facet['type']) {
397
-                ${$name.'AggregationFilter'} = new Filter($name);
397
+                ${$name . 'AggregationFilter'} = new Filter($name);
398 398
 
399
-                ${$name.'Aggregation'} = new AggregationRange($name);
399
+                ${$name . 'Aggregation'} = new AggregationRange($name);
400 400
                 foreach ($facet['values'] as $value) {
401
-                    ${$name.'Aggregation'}
401
+                    ${$name . 'Aggregation'}
402 402
                         ->setField($name)
403 403
                         ->addRange($value['from'], $value['to']);
404 404
                 }
405 405
 
406
-                ${$name.'AggregationFilter'}->addAggregation(${$name.'Aggregation'});
406
+                ${$name . 'AggregationFilter'}->addAggregation(${$name . 'Aggregation'});
407 407
             }
408 408
 
409
-            $aggregations[$name]['aggregation'] = ${$name.'Aggregation'};
410
-            $aggregations[$name]['aggregation_filter'] = ${$name.'AggregationFilter'};
409
+            $aggregations[$name]['aggregation'] = ${$name . 'Aggregation'};
410
+            $aggregations[$name]['aggregation_filter'] = ${$name . 'AggregationFilter'};
411 411
         }
412 412
 
413 413
         return $aggregations;
@@ -428,20 +428,20 @@  discard block
 block discarded – undo
428 428
         foreach ($facets as $name => $facet) {
429 429
             $normName = key($facet);
430 430
 
431
-            ${$normName.'BoolFilter'} = new BoolFilter();
431
+            ${$normName . 'BoolFilter'} = new BoolFilter();
432 432
 
433 433
             foreach ($appliedFilters as $value) {
434 434
                 if (is_array($value[key($value)])) {
435
-                    ${$normName.'RangeFilter'} = new FilterRange();
435
+                    ${$normName . 'RangeFilter'} = new FilterRange();
436 436
 
437 437
                     foreach ($value as $range) {
438
-                        ${$normName.'RangeFilter'}->addField($name, ['gte' => $range['range'][0], 'lte' => $range['range'][1]]);
439
-                        ${$normName.'BoolFilter'}->addMust($rangeFilters);
438
+                        ${$normName . 'RangeFilter'}->addField($name, ['gte' => $range['range'][0], 'lte' => $range['range'][1]]);
439
+                        ${$normName . 'BoolFilter'}->addMust($rangeFilters);
440 440
                     }
441 441
                 } else {
442
-                    ${$normName.'TermFilter'} = new FilterTerm();
443
-                    ${$normName.'TermFilter'}->setTerm($name, $value[key($value)]);
444
-                    ${$normName.'BoolFilter'}->addMust($termFilters);
442
+                    ${$normName . 'TermFilter'} = new FilterTerm();
443
+                    ${$normName . 'TermFilter'}->setTerm($name, $value[key($value)]);
444
+                    ${$normName . 'BoolFilter'}->addMust($termFilters);
445 445
                 }
446 446
             }
447 447
         }
@@ -451,8 +451,8 @@  discard block
 block discarded – undo
451 451
                 if (count($facets) >= count($this->config['filters']['facets'])) {
452 452
                     $aggregations[$name]['aggregation_filter']->setFilter($boolFilter);
453 453
                 } elseif ($name != key($value)) {
454
-                    if (isset(${key($value).'BoolFilter'})) {
455
-                        $aggregations[$name]['aggregation_filter']->setFilter(${key($value).'BoolFilter'});
454
+                    if (isset(${key($value) . 'BoolFilter'})) {
455
+                        $aggregations[$name]['aggregation_filter']->setFilter(${key($value) . 'BoolFilter'});
456 456
                     }
457 457
                 }
458 458
             }
Please login to merge, or discard this patch.
Bundle/FixturesBundle/DependencyInjection/SyliusFixturesExtension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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',
Please login to merge, or discard this patch.
src/Sylius/Bundle/MoneyBundle/DependencyInjection/SyliusMoneyExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     public function load(array $config, ContainerBuilder $container)
31 31
     {
32 32
         $config = $this->processConfiguration($this->getConfiguration($config, $container), $config);
33
-        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
33
+        $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
34 34
 
35 35
         $container->setParameter('sylius.money.locale', $config['locale']);
36 36
         $container->setParameter('sylius.money.currency', $config['currency']);
Please login to merge, or discard this patch.
src/Sylius/Bundle/TaxonomyBundle/Form/Type/TaxonChoiceType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
                 []
Please login to merge, or discard this patch.
Bundle/TaxonomyBundle/DependencyInjection/SyliusTaxonomyExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     public function load(array $config, ContainerBuilder $container)
28 28
     {
29 29
         $config = $this->processConfiguration($this->getConfiguration($config, $container), $config);
30
-        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
30
+        $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
31 31
 
32 32
         $loader->load(sprintf('driver/%s.xml', $config['driver']));
33 33
 
Please login to merge, or discard this patch.
src/Sylius/Bundle/CoreBundle/Doctrine/ORM/PaymentRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
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'])) {
Please login to merge, or discard this patch.