Passed
Push — master ( 249a0e...ea66cd )
by Dev
11:53
created
src/Controller/PageController.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@
 block discarded – undo
60 60
         $real = $request->getRequestUri();
61 61
 
62 62
         $expected = 'homepage' == $page->getSlug() ?
63
-            $this->get('piedweb.page_canonical')->generatePathForHomepage() :
64
-            $this->get('piedweb.page_canonical')->generatePathForPage($page->getRealSlug());
63
+            $this->get('piedweb.page_canonical')->generatePathForHomepage() : $this->get('piedweb.page_canonical')->generatePathForPage($page->getRealSlug());
65 64
 
66 65
         if ($real != $expected) {
67 66
             return [$request->getBasePath().$expected, 301];
Please login to merge, or discard this patch.
src/Admin/PageAdmin.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
 
111 111
         if ($this->exists('template')) {
112 112
             $formMapper->add('template', null, [
113
-                 'label' => 'admin.page.template.label',
114
-                 'required' => false,
113
+                    'label' => 'admin.page.template.label',
114
+                    'required' => false,
115 115
             ]);
116 116
         }
117 117
 
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
                 'choices' => [
239 239
                     'admin.page.metaRobots.choice.noIndex' => 'noindex',
240 240
                 ],
241
-                 'label' => 'admin.page.metaRobots.label',
241
+                    'label' => 'admin.page.metaRobots.label',
242 242
                 'required' => false,
243 243
             ]);
244 244
         }
@@ -318,9 +318,9 @@  discard block
 block discarded – undo
318 318
 
319 319
         if ($this->exists('author')) {
320 320
             $formMapper->add('author', null, [
321
-                 'label' => 'admin.page.author.label',
322
-                 'class' => $this->getContainer()->getParameter('app.entity_user'),
323
-                 'required' => false,
321
+                    'label' => 'admin.page.author.label',
322
+                    'class' => $this->getContainer()->getParameter('app.entity_user'),
323
+                    'required' => false,
324 324
             ]);
325 325
         }
326 326
     }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                     'property' => 'title', // or any field in your media entity
124 124
                     'label' => 'admin.page.relatedPage.label',
125 125
                     'btn_add' => false,
126
-                    'to_string_callback' => function ($entity) {
126
+                    'to_string_callback' => function($entity) {
127 127
                         return $entity->getTitle();
128 128
                     },
129 129
             ]);
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
             'label' => 'admin.page.translations.label',
183 183
             'help' => 'admin.page.translations.help',
184 184
             'btn_add' => false,
185
-            'to_string_callback' => function ($entity) {
185
+            'to_string_callback' => function($entity) {
186 186
                 return $entity->getLocale()
187 187
                     ? $entity->getLocale().' ('.$entity->getSlug().')'
188 188
                     : $entity->getSlug(); // switch for getLocale
Please login to merge, or discard this patch.
src/EventListener/MediaListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
 }exit;
113 113
 
114 114
             /**/
115
-            $this->eventDispatcher->addListener(KernelEvents::TERMINATE, function (EventDispatcher $event) use ($mapping, $media) {
115
+            $this->eventDispatcher->addListener(KernelEvents::TERMINATE, function(EventDispatcher $event) use ($mapping, $media) {
116 116
 
117 117
                 $this->generateCache($media);
118 118
             });
Please login to merge, or discard this patch.
src/EventListener/MediaCacheGeneratorTrait.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
         echo 'wait for jpg :'.PHP_EOL;
83 83
         echo $event->getPeriods()[$period++]->getDuration().PHP_EOL;
84 84
 
85
-         foreach ($filters as $filter) {
85
+            foreach ($filters as $filter) {
86 86
             $this->imgToWebP($media, $filter);
87 87
             //$this->storeImageInCache($pathWebP, $binary, $filter); liip not optimized...
88 88
         }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -58,16 +58,16 @@  discard block
 block discarded – undo
58 58
 
59 59
 
60 60
         /**/
61
-        $i=0;
61
+        $i = 0;
62 62
         foreach ($filters as $filter) {
63 63
             ++$i;
64 64
             //$this->storeImageInCache($path, $binary, $filter);
65 65
             /**/
66 66
             // this is a bit quicker but less optimized (more CPU usage and more Threads) =>
67
-            ${'process' . $i} = new Process([$this->projectDir.'/bin/console', 'liip:imagine:cache:resolve "'.$path.'" --force --filter='.$filter]);
67
+            ${'process'.$i} = new Process([$this->projectDir.'/bin/console', 'liip:imagine:cache:resolve "'.$path.'" --force --filter='.$filter]);
68 68
             //.' >/dev/null 2>&1 &');
69
-            ${'process' . $i}->disableOutput();
70
-            ${'process' . $i}->start();
69
+            ${'process'.$i}->disableOutput();
70
+            ${'process'.$i}->start();
71 71
             /**/
72 72
         }
73 73
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         echo 'init process for jpg filters :'.PHP_EOL;
76 76
         echo $event->getPeriods()[$period++]->getDuration().PHP_EOL;
77 77
 
78
-        for ($j = 1; $j < $i; $j++) { ${'process' . $j}->wait(); } /**/
78
+        for ($j = 1; $j < $i; $j++) { ${'process'.$j}->wait(); } /**/
79 79
 
80 80
 
81 81
         $event = $this->stopWatch->lap('fdb');
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         $webPConverterOptions = self::$webPConverterOptions;
170 170
         $projectDir = $this->projectDir;
171 171
         //var_dump($path); exit;
172
-        $this->pool->add(function () use ($projectDir, $path, $pathJpg, $pathWebP, $webPConverterOptions, $filter) {
172
+        $this->pool->add(function() use ($projectDir, $path, $pathJpg, $pathWebP, $webPConverterOptions, $filter) {
173 173
             // took 46s (vs 43s) to add liip generation in async
174 174
             //exec($projectDir.'/bin/console liip:imagine:cache:resolve "'.$path.'" --force --filter='.$filter.' >/dev/null 2>&1 &');
175 175
             self::imgToWebPStatic($pathJpg, $pathWebP, $webPConverterOptions, $filter);
Please login to merge, or discard this patch.