Passed
Push — v3 ( 7f2a90...c48bde )
by Andrew
12:47 queued 18s
created
src/helpers/Field.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         $foundFields = [];
126 126
         if (!empty(self::FIELD_CLASSES[$fieldClassKey])) {
127 127
             // Cache me if you can
128
-            $memoKey = $fieldClassKey . $layout->id . ($keysOnly ? 'keys' : 'nokeys');
128
+            $memoKey = $fieldClassKey.$layout->id.($keysOnly ? 'keys' : 'nokeys');
129 129
             if (!empty(self::$fieldsOfTypeFromLayoutCache[$memoKey])) {
130 130
                 return self::$fieldsOfTypeFromLayoutCache[$memoKey];
131 131
             }
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
                 $prefix = $global->handle;
243 243
                 $fields = array_combine(
244 244
                     array_map(function($key) use ($prefix) {
245
-                        return $prefix . '.' . $key;
245
+                        return $prefix.'.'.$key;
246 246
                     }, array_keys($fields)),
247 247
                     $fields
248 248
                 );
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
         }
317 317
         if ($matrixBlockTypeModel) {
318 318
             // Cache me if you can
319
-            $memoKey = $fieldType . $matrixBlock->id . ($keysOnly ? 'keys' : 'nokeys');
319
+            $memoKey = $fieldType.$matrixBlock->id.($keysOnly ? 'keys' : 'nokeys');
320 320
             if (!empty(self::$matrixFieldsOfTypeCache[$memoKey])) {
321 321
                 return self::$matrixFieldsOfTypeCache[$memoKey];
322 322
             }
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
         $layout = $neoBlock->getFieldLayout();
356 356
         if ($layout) {
357 357
             // Cache me if you can
358
-            $memoKey = $fieldType . $neoBlock->id . ($keysOnly ? 'keys' : 'nokeys');
358
+            $memoKey = $fieldType.$neoBlock->id.($keysOnly ? 'keys' : 'nokeys');
359 359
             if (!empty(self::$neoFieldsOfTypeCache[$memoKey])) {
360 360
                 return self::$neoFieldsOfTypeCache[$memoKey];
361 361
             }
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
         }
399 399
         if ($superTableBlockTypeModel) {
400 400
             // Cache me if you can
401
-            $memoKey = $fieldType . $superTableBlock->id . ($keysOnly ? 'keys' : 'nokeys');
401
+            $memoKey = $fieldType.$superTableBlock->id.($keysOnly ? 'keys' : 'nokeys');
402 402
             if (!empty(self::$superTableFieldsOfTypeCache[$memoKey])) {
403 403
                 return self::$superTableFieldsOfTypeCache[$memoKey];
404 404
             }
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -275,7 +275,7 @@
 block discarded – undo
275 275
         string $sourceHandle,
276 276
         string $fieldClassKey,
277 277
         bool   $keysOnly = true,
278
-               $typeId = null
278
+                $typeId = null
279 279
     ): array {
280 280
         $foundFields = [];
281 281
         $layouts = [];
Please login to merge, or discard this patch.
src/helpers/Json.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
         } elseif ($json === null || $json === '') {
56 56
             return null;
57 57
         }
58
-        $decode = json_decode((string)$json, $asArray, 512, JSON_BIGINT_AS_STRING);
58
+        $decode = json_decode((string) $json, $asArray, 512, JSON_BIGINT_AS_STRING);
59 59
         static::handleJsonError(json_last_error());
60 60
 
61 61
         return $decode;
Please login to merge, or discard this patch.
src/helpers/MetaValue.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
                 $metaValue = Craft::t(
295 295
                     'seomatic',
296 296
                     'Error rendering `{template}` -> {error}',
297
-                    ['template' => $metaValue, 'error' => $e->getMessage() . ' - ' . print_r($metaValue, true)]
297
+                    ['template' => $metaValue, 'error' => $e->getMessage().' - '.print_r($metaValue, true)]
298 298
                 );
299 299
                 Craft::error($metaValue, __METHOD__);
300 300
                 Craft::$app->getErrorHandler()->logException($e);
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
         // Handle being passed in an object
314 314
         if (is_object($metaValue)) {
315 315
             if ($metaValue instanceof Markup) {
316
-                return trim(html_entity_decode((string)$metaValue, ENT_NOQUOTES, 'UTF-8'));
316
+                return trim(html_entity_decode((string) $metaValue, ENT_NOQUOTES, 'UTF-8'));
317 317
             }
318 318
             if ($metaValue instanceof Asset) {
319 319
                 return $metaValue->uri;
Please login to merge, or discard this patch.
src/helpers/Text.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         if (!empty($string)) {
74 74
             $string = HtmlPurifier::process($string, ['HTML.Allowed' => '']);
75 75
             $string = html_entity_decode($string, ENT_NOQUOTES, 'UTF-8');
76
-            $result = (string)Stringy::create($string)->truncate($length, $substring);
76
+            $result = (string) Stringy::create($string)->truncate($length, $substring);
77 77
         }
78 78
 
79 79
         return $result;
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         if (!empty($string)) {
99 99
             $string = HtmlPurifier::process($string, ['HTML.Allowed' => '']);
100 100
             $string = html_entity_decode($string, ENT_NOQUOTES, 'UTF-8');
101
-            $result = (string)Stringy::create($string)->safeTruncate($length, $substring);
101
+            $result = (string) Stringy::create($string)->safeTruncate($length, $substring);
102 102
         }
103 103
 
104 104
         return $result;
@@ -132,9 +132,9 @@  discard block
 block discarded – undo
132 132
             $result = self::smartStripTags(Doxter::$plugin->getService()->parseMarkdown($field->getRaw()));
133 133
         } else {
134 134
             if (is_array($field)) {
135
-                $result = self::smartStripTags((string)$field[0]);
135
+                $result = self::smartStripTags((string) $field[0]);
136 136
             } else {
137
-                $result = self::smartStripTags((string)$field);
137
+                $result = self::smartStripTags((string) $field);
138 138
             }
139 139
         }
140 140
 
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
             $tags = $tags->all();
162 162
         }
163 163
         foreach ($tags as $tag) {
164
-            $result .= $tag->title . ', ';
164
+            $result .= $tag->title.', ';
165 165
         }
166 166
         $result = rtrim($result, ', ');
167 167
 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
                     foreach ($fieldClasses as $fieldClassKey) {
204 204
                         if ($field instanceof $fieldClassKey) {
205 205
                             if ($field->handle === $fieldHandle || empty($fieldHandle)) {
206
-                                $result .= self::extractTextFromField($block[$field->handle]) . ' ';
206
+                                $result .= self::extractTextFromField($block[$field->handle]).' ';
207 207
                             }
208 208
                         }
209 209
                     }
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
                     foreach ($fieldClasses as $fieldClassKey) {
246 246
                         if ($field instanceof $fieldClassKey) {
247 247
                             if ($field->handle === $fieldHandle || empty($fieldHandle)) {
248
-                                $result .= self::extractTextFromField($block[$field->handle]) . ' ';
248
+                                $result .= self::extractTextFromField($block[$field->handle]).' ';
249 249
                             }
250 250
                         }
251 251
                     }
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
                     foreach ($fieldClasses as $fieldClassKey) {
295 295
                         if ($field instanceof $fieldClassKey) {
296 296
                             if ($field->handle === $fieldHandle || empty($fieldHandle)) {
297
-                                $result .= self::extractTextFromField($block[$field->handle]) . ' ';
297
+                                $result .= self::extractTextFromField($block[$field->handle]).' ';
298 298
                             }
299 299
                         }
300 300
                     }
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
         $str = html_entity_decode($str, ENT_NOQUOTES, 'UTF-8');
394 394
         $str = rawurldecode($str);
395 395
         // Remove any linebreaks
396
-        $str = (string)preg_replace("/\r|\n/", "", $str);
396
+        $str = (string) preg_replace("/\r|\n/", "", $str);
397 397
         $str = HtmlPurifier::process($str, ['HTML.Allowed' => '']);
398 398
         $str = html_entity_decode($str, ENT_NOQUOTES, 'UTF-8');
399 399
         // Remove any embedded Twig code
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
             $language = 'English';
474 474
         }
475 475
 
476
-        $className = 'PhpScience\\TextRank\\Tool\\StopWords\\' . ucfirst($language);
476
+        $className = 'PhpScience\\TextRank\\Tool\\StopWords\\'.ucfirst($language);
477 477
         if (class_exists($className)) {
478 478
             $stopWords = new $className();
479 479
         }
Please login to merge, or discard this patch.
src/debug/views/seomatic/render-tag.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,8 +75,11 @@
 block discarded – undo
75 75
                     </ul><?php endif; ?><?php endforeach; ?><?php endif; ?></div>
76 76
         </details>
77 77
     </td>
78
-<?php else: ?>
78
+<?php else {
79
+    : ?>
79 80
     <td>
80 81
         <div class="callout callout-secondary seomatic-callout">not included</div>
81 82
     </td>
82
-<?php endif; ?>
83
+<?php endif;
84
+}
85
+?>
Please login to merge, or discard this patch.
src/debug/views/seomatic/render-value.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,10 @@
 block discarded – undo
45 45
             </div>
46 46
         </details>
47 47
     </td>
48
-<?php else: ?>
48
+<?php else {
49
+    : ?>
49 50
     <td><?= htmlspecialchars(VarDumper::dumpAsString($value), ENT_QUOTES | ENT_SUBSTITUTE,
50 51
             Yii::$app->charset, true) ?></td>
51
-<?php endif; ?>
52
+<?php endif;
53
+}
54
+?>
Please login to merge, or discard this patch.
src/seoelements/SeoEvent.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -241,8 +241,8 @@  discard block
 block discarded – undo
241 241
         $query
242 242
             ->setCalendar($metaBundle->sourceHandle)
243 243
             ->setLoadOccurrences(false)
244
-            ->siteId((int)$metaBundle->sourceSiteId)
245
-            ->limit((int)$metaBundle->metaSitemapVars->sitemapLimit);
244
+            ->siteId((int) $metaBundle->sourceSiteId)
245
+            ->limit((int) $metaBundle->metaSitemapVars->sitemapLimit);
246 246
 
247 247
         return $query;
248 248
     }
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
             ConfigHelper::getConfigFromFile(self::configFilePath()),
406 406
             [
407 407
                 'sourceId' => $sourceModel->id,
408
-                'sourceName' => (string)$sourceModel->name,
408
+                'sourceName' => (string) $sourceModel->name,
409 409
                 'sourceHandle' => $sourceModel->handle,
410 410
             ]
411 411
         );
Please login to merge, or discard this patch.
src/seoelements/SeoCategory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
             ->siteId($metaBundle->sourceSiteId)
219 219
             ->limit($metaBundle->metaSitemapVars->sitemapLimit);
220 220
         if (!empty($metaBundle->metaSitemapVars->structureDepth)) {
221
-            $query->level($metaBundle->metaSitemapVars->structureDepth . '<=');
221
+            $query->level($metaBundle->metaSitemapVars->structureDepth.'<=');
222 222
         }
223 223
 
224 224
         return $query;
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
             ConfigHelper::getConfigFromFile(self::configFilePath()),
375 375
             [
376 376
                 'sourceId' => $sourceModel->id,
377
-                'sourceName' => (string)$sourceModel->name,
377
+                'sourceName' => (string) $sourceModel->name,
378 378
                 'sourceHandle' => $sourceModel->handle,
379 379
             ]
380 380
         );
Please login to merge, or discard this patch.
src/base/FluentModel.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
         // Set the property
68 68
         $value = $args[0];
69 69
         if (is_object($value) && $value instanceof Markup) {
70
-            $value = (string)$value;
70
+            $value = (string) $value;
71 71
         }
72 72
         $property->setValue($this, $value);
73 73
 
Please login to merge, or discard this patch.