Passed
Push — v3 ( a3db2e...9bd0d9 )
by Andrew
16:37 queued 08:34
created
src/services/MetaContainers.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         // Get the page number of this request
144 144
         $request = Craft::$app->getRequest();
145 145
         if (!$request->isConsoleRequest) {
146
-            $this->paginationPage = (string)$request->pageNum;
146
+            $this->paginationPage = (string) $request->pageNum;
147 147
         }
148 148
     }
149 149
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
                 $cache = Craft::$app->getCache();
219 219
                 list($this->metaGlobalVars, $this->metaSiteVars, $this->metaSitemapVars, $this->metaContainers) = $cache->getOrSet(
220 220
                     self::CACHE_KEY.$cacheKey,
221
-                    function () use ($uri, $siteId) {
221
+                    function() use ($uri, $siteId) {
222 222
                         Craft::info(
223 223
                             'Meta container cache miss: '.$uri.'/'.$siteId,
224 224
                             __METHOD__
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
         $uniqueKey .= $bodyPosition;
255 255
         $scriptData = Craft::$app->getCache()->getOrSet(
256 256
             self::GLOBALS_CACHE_KEY.$uniqueKey,
257
-            function () use ($uniqueKey, $bodyPosition) {
257
+            function() use ($uniqueKey, $bodyPosition) {
258 258
                 Craft::info(
259 259
                     self::SCRIPTS_CACHE_KEY.' cache miss: '.$uniqueKey,
260 260
                     __METHOD__
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
                         foreach ($scriptContainer->data as $metaScript) {
268 268
                             /** @var MetaScript $metaScript */
269 269
                             if (!empty($metaScript->bodyTemplatePath)
270
-                                && ((int)$metaScript->bodyPosition === $bodyPosition)) {
270
+                                && ((int) $metaScript->bodyPosition === $bodyPosition)) {
271 271
                                 $scriptData[] = $metaScript->renderBodyHtml();
272 272
                             }
273 273
                         }
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
         $uniqueKey = $dependency->tags[3] ?? self::GLOBALS_CACHE_KEY;
328 328
         list($this->metaGlobalVars, $this->metaSiteVars) = Craft::$app->getCache()->getOrSet(
329 329
             self::GLOBALS_CACHE_KEY.$uniqueKey,
330
-            function () use ($uniqueKey) {
330
+            function() use ($uniqueKey) {
331 331
                 Craft::info(
332 332
                     self::GLOBALS_CACHE_KEY.' cache miss: '.$uniqueKey,
333 333
                     __METHOD__
Please login to merge, or discard this patch.
src/helpers/DynamicMeta.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     {
103 103
         if ($pageInfo !== null && $pageInfo->currentPage !== null) {
104 104
             // Let the meta containers know that this page is paginated
105
-            Seomatic::$plugin->metaContainers->paginationPage = (string)$pageInfo->currentPage;
105
+            Seomatic::$plugin->metaContainers->paginationPage = (string) $pageInfo->currentPage;
106 106
             // Set the the canonical URL to be the first page of the paginated pages
107 107
             // see: https://github.com/nystudio107/craft-seomatic/issues/375#issuecomment-488369209
108 108
             $url = $pageInfo->getFirstUrl();
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
         if (!empty(Seomatic::$settings->cspScriptSrcPolicies)) {
224 224
             $fixedCsps = Seomatic::$settings->cspScriptSrcPolicies;
225 225
             $iterator = new \RecursiveIteratorIterator(new \RecursiveArrayIterator($fixedCsps));
226
-            foreach($iterator as $value) {
226
+            foreach ($iterator as $value) {
227 227
                 $cspNonces[] = $value;
228 228
             }
229 229
         }
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
         if ($lastElement && $element) {
456 456
             if ($lastElement->uri !== '__home__' && $element->uri) {
457 457
                 $path = $lastElement->uri;
458
-                $segments = array_values(array_filter(explode('/', $path), function ($segment) {
458
+                $segments = array_values(array_filter(explode('/', $path), function($segment) {
459 459
                     return $segment !== '';
460 460
                 }));
461 461
             }
@@ -626,7 +626,7 @@  discard block
 block discarded – undo
626 626
                     $element = $elements->getElementByUri($url, $site->id, false);
627 627
                 }
628 628
                 if ($element !== null) {
629
-                    if (isset($element->enabledForSite) && !(bool)$element->enabledForSite) {
629
+                    if (isset($element->enabledForSite) && !(bool) $element->enabledForSite) {
630 630
                         $includeUrl = false;
631 631
                     }
632 632
                     /** @var MetaBundle $metaBundle */
@@ -742,7 +742,7 @@  discard block
 block discarded – undo
742 742
                 if (isset($value[$day][$time])
743 743
                     && ($date = DateTimeHelper::toDateTime($value[$day][$time])) !== false
744 744
                 ) {
745
-                    $normalized[$day][$time] = (array)($date);
745
+                    $normalized[$day][$time] = (array) ($date);
746 746
                 } else {
747 747
                     $normalized[$day][$time] = null;
748 748
                 }
Please login to merge, or discard this patch.