Passed
Push — master ( 97dd58...4109cd )
by Dev
10:22
created
src/Admin/PageAdminFormFieldsTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
             'help_html' => true,
139 139
             'help' => 'admin.page.translations.help',
140 140
             'btn_add' => false,
141
-            'to_string_callback' => function ($entity) {
141
+            'to_string_callback' => function($entity) {
142 142
                 return $entity->getLocale()
143 143
                     ? $entity->getLocale().' ('.$entity->getSlug().')'
144 144
                     : $entity->getSlug(); // switch for getLocale
Please login to merge, or discard this patch.
src/Admin/PageAdmin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         $columnFields = [
62 62
             'admin.page.state.label' => ['createdAt', 'metaRobots'],
63 63
             'admin.page.permanlien.label' => ['host', 'slug', 'parentPage'],
64
-            'admin.page.extended.label' => ['expand' => true, 'fields' => ['mainImage', 'name', 'title',  'excrept']],
64
+            'admin.page.extended.label' => ['expand' => true, 'fields' => ['mainImage', 'name', 'title', 'excrept']],
65 65
             'admin.page.translations.label' => ['locale', 'translations'],
66 66
             'admin.page.otherProperties.label' => ['expand' => true, 'fields' => ['otherProperties']],
67 67
             'admin.page.images.label' => ['images'],
Please login to merge, or discard this patch.
src/Entity/PageTrait.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@
 block discarded – undo
21 21
     public function getH1($elseTitle = false): ?string
22 22
     {
23 23
         if ($elseTitle) {
24
-            return ShortCodeConverter::do($this->h1 ?? $this->title ?? '', $this->getLocale());
24
+            return ShortCodeConverter::do {
25
+                ($this->h1 ?? $this->title ?? '', $this->getLocale());
26
+            }
25 27
         }
26 28
 
27 29
         return $this->h1;
Please login to merge, or discard this patch.
src/Service/ShortCodeConverter.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,11 +4,13 @@
 block discarded – undo
4 4
 
5 5
 class ShortCodeConverter
6 6
 {
7
-    public static function do($string, $locale = null)
7
+    public static function do {
8
+        ($string, $locale = null)
8 9
     {
9 10
         //var_dump($string); exit;
10 11
         if ($locale) {
11 12
             setlocale(LC_TIME, self::convertLocale($locale));
13
+    }
12 14
         }
13 15
 
14 16
         //$string = preg_replace('/date\([\'"]?([a-z% ]+)[\'"]?\)/i',
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
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
 
124 124
             $this->eventDispatcher->addListener(
125 125
                 KernelEvents::TERMINATE,
126
-                function () use ($media) {
126
+                function() use ($media) {
127 127
                     $this->cacheGenerator->generateCache($media);
128 128
                 }
129 129
             );
Please login to merge, or discard this patch.
src/Service/MediaCacheGeneratorService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         $pathWebP = $this->projectDir.'/public/'.$media->getRelativeDir().'/'.$filter.'/'.$media->getSlug().'.webp';
119 119
         $webPConverterOptions = self::$webPConverterOptions;
120 120
 
121
-        $this->pool->add(function () use ($pathJpg, $pathWebP, $webPConverterOptions, $filter) {
121
+        $this->pool->add(function() use ($pathJpg, $pathWebP, $webPConverterOptions, $filter) {
122 122
             // took 46s (vs 43s) to add liip generation in async
123 123
             //exec($projectDir.'/bin/console liip:imagine:cache:resolve "'.$path.'" --force --filter='.$filter
124 124
             //.' >/dev/null 2>&1 &');
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         $source = $this->projectDir.$media->getPath();
133 133
         //self::createWebPStatic($destination, $source);
134 134
 
135
-        $this->pool->add(function () use ($destination, $source) {
135
+        $this->pool->add(function() use ($destination, $source) {
136 136
             self::createWebPStatic($destination, $source);
137 137
         });
138 138
     }
Please login to merge, or discard this patch.
src/Controller/PageController.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@  discard block
 block discarded – undo
61 61
         $real = $request->getRequestUri();
62 62
 
63 63
         $expected = 'homepage' == $page->getSlug() ?
64
-            $this->get('piedweb.page_canonical')->generatePathForHomepage() :
65
-            $this->get('piedweb.page_canonical')->generatePathForPage($page->getRealSlug());
64
+            $this->get('piedweb.page_canonical')->generatePathForHomepage() : $this->get('piedweb.page_canonical')->generatePathForPage($page->getRealSlug());
66 65
 
67 66
         if ($real != $expected) {
68 67
             return [$request->getBasePath().$expected, 301];
@@ -172,7 +171,7 @@  discard block
 block discarded – undo
172 171
 
173 172
     protected function getPages(?int $limit = null, Request $request, ParameterBagInterface $params)
174 173
     {
175
-        $requestedLocale = rtrim($request->getLocale(),'/');
174
+        $requestedLocale = rtrim($request->getLocale(), '/');
176 175
 
177 176
         $app = App::load($request, $params);
178 177
         $pages = Repository::getPageRepository($this->getDoctrine(), $params->get('pwc.entity_page'))
Please login to merge, or discard this patch.
src/StaticGenerator/StaticCommand.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,9 @@
 block discarded – undo
30 30
     {
31 31
         if ($input->getArgument('host')) {
32 32
             $this->staticAppGenerator->generateFromHost($input->getArgument('host'));
33
-        } else
34
-            $this->staticAppGenerator->generateAll();
33
+        } else {
34
+                    $this->staticAppGenerator->generateAll();
35
+        }
35 36
 
36 37
         $output->writeln('Static version generation succeeded.');
37 38
     }
Please login to merge, or discard this patch.
src/StaticGenerator/StaticAppGenerator.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -409,8 +409,7 @@
 block discarded – undo
409 409
             // todo
410 410
             //$this->addRedirection($liveUri, getRedirectUri)
411 411
             return;
412
-        }
413
-        elseif (200 != $response->getStatusCode()) {
412
+        } elseif (200 != $response->getStatusCode()) {
414 413
             // todo log context
415 414
             return;
416 415
         }
Please login to merge, or discard this patch.