Passed
Push — master ( 4109cd...3773bc )
by Dev
13:23
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/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   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,8 +62,7 @@  discard block
 block discarded – undo
62 62
         $real = $request->getRequestUri();
63 63
 
64 64
         $expected = 'homepage' == $page->getSlug() ?
65
-            $this->get('piedweb.page_canonical')->generatePathForHomepage() :
66
-            $this->get('piedweb.page_canonical')->generatePathForPage($page->getRealSlug());
65
+            $this->get('piedweb.page_canonical')->generatePathForHomepage() : $this->get('piedweb.page_canonical')->generatePathForPage($page->getRealSlug());
67 66
 
68 67
         if ($real != $expected) {
69 68
             return [$request->getBasePath().$expected, 301];
@@ -151,7 +150,7 @@  discard block
 block discarded – undo
151 150
         return $this->render('@PiedWebCMS/page/rss.xml.twig', array_merge([
152 151
             'pages' => $this->getPages(5, $request, $params),
153 152
             'page' => $page,
154
-            'feedUri' => 'feed'.($params->get('locale') == $locale ? '' : '.'.$locale).'.xml',], $app->getParamsForRendering()));
153
+            'feedUri' => 'feed'.($params->get('locale') == $locale ? '' : '.'.$locale).'.xml', ], $app->getParamsForRendering()));
155 154
     }
156 155
 
157 156
     public function showSitemap(
@@ -174,7 +173,7 @@  discard block
 block discarded – undo
174 173
 
175 174
     protected function getPages(?int $limit = null, Request $request, ParameterBagInterface $params)
176 175
     {
177
-        $requestedLocale = rtrim($request->getLocale(),'/');
176
+        $requestedLocale = rtrim($request->getLocale(), '/');
178 177
 
179 178
         $app = App::load($request, $params);
180 179
         $pages = Repository::getPageRepository($this->getDoctrine(), $params->get('pwc.entity_page'))
Please login to merge, or discard this patch.
src/PageScanner/PageScannerService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         ];
110 110
     }
111 111
 
112
-    protected static function prepareForRegex ($var)
112
+    protected static function prepareForRegex($var)
113 113
     {
114 114
         if (is_string($var)) {
115 115
             return preg_quote($var, '/');
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
     {
130 130
         $urlInAttributes = ' '.self::prepareForRegex(['href', 'data-rot', 'src', 'data-img', 'data-bg']);
131 131
         $regex = '/'.$urlInAttributes.'=((["\'])([^\3]+)\3|([^\s>]+)[\s>])/iU';
132
-        preg_match_all(            $regex,            $this->pageHtml,            $matches        );
132
+        preg_match_all($regex, $this->pageHtml, $matches);
133 133
 
134 134
         $linkedDocs = [];
135 135
         foreach ($matches[0] as $k => $match) {
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
             $this->linksCheckedCounter++;
165 165
             if (!is_string($uri))
166 166
                 continue;
167
-            if (($uri[0] == '/' && !$this->uriExist($uri) )
167
+            if (($uri[0] == '/' && !$this->uriExist($uri))
168 168
                 || (strpos($uri, 'http') === 0 && !$this->urlExist($uri))) {
169 169
                 $this->addError('<code>'.$uri.'</code> introuvable');
170 170
             }
Please login to merge, or discard this patch.