Passed
Pull Request — v3 (#436)
by Ben
07:13
created
src/models/MetaSitemapVars.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -94,10 +94,10 @@
 block discarded – undo
94 94
     public function init()
95 95
     {
96 96
         // Enforce types
97
-        $this->sitemapUrls = (bool)$this->sitemapUrls;
98
-        $this->sitemapAssets = (bool)$this->sitemapAssets;
99
-        $this->sitemapFiles = (bool)$this->sitemapFiles;
100
-        $this->sitemapAltLinks = (bool)$this->sitemapAltLinks;
97
+        $this->sitemapUrls = (bool) $this->sitemapUrls;
98
+        $this->sitemapAssets = (bool) $this->sitemapAssets;
99
+        $this->sitemapFiles = (bool) $this->sitemapFiles;
100
+        $this->sitemapAltLinks = (bool) $this->sitemapAltLinks;
101 101
     }
102 102
 
103 103
     /**
Please login to merge, or discard this patch.
src/helpers/ImageTransform.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         }
114 114
         $asset = self::assetFromAssetOrId($asset, $siteId);
115 115
         if (($asset !== null) && ($asset instanceof Asset)) {
116
-            $width = (string)$asset->getWidth($transform);
116
+            $width = (string) $asset->getWidth($transform);
117 117
             if ($width === null) {
118 118
                 $width = '';
119 119
             }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         }
145 145
         $asset = self::assetFromAssetOrId($asset, $siteId);
146 146
         if (($asset !== null) && ($asset instanceof Asset)) {
147
-            $height = (string)$asset->getHeight($transform);
147
+            $height = (string) $asset->getHeight($transform);
148 148
             if ($height === null) {
149 149
                 $height = '';
150 150
             }
Please login to merge, or discard this patch.
src/helpers/Text.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
         if (!empty($string)) {
68 68
             $string = strip_tags($string);
69
-            $result = (string)Stringy::create($string)->truncate($length, $substring);
69
+            $result = (string) Stringy::create($string)->truncate($length, $substring);
70 70
         }
71 71
 
72 72
         return $result;
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
         if (!empty($string)) {
92 92
             $string = strip_tags($string);
93
-            $result = (string)Stringy::create($string)->safeTruncate($length, $substring);
93
+            $result = (string) Stringy::create($string)->safeTruncate($length, $substring);
94 94
         }
95 95
 
96 96
         return $result;
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
             $result = self::extractTextFromTags($field);
117 117
         } else {
118 118
             if (\is_array($field)) {
119
-                $result = strip_tags((string)$field[0]);
119
+                $result = strip_tags((string) $field[0]);
120 120
             } else {
121
-                $result = strip_tags((string)$field);
121
+                $result = strip_tags((string) $field);
122 122
             }
123 123
         }
124 124
 
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 
232 232
         return \is_array($keywords)
233 233
             ? implode(', ', \array_slice(array_keys($keywords), 0, $limit))
234
-            : (string)$keywords;
234
+            : (string) $keywords;
235 235
     }
236 236
 
237 237
     /**
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 
268 268
         return \is_array($sentences)
269 269
             ? implode(' ', $sentences)
270
-            : (string)$sentences;
270
+            : (string) $sentences;
271 271
     }
272 272
 
273 273
     /**
Please login to merge, or discard this patch.
src/helpers/Config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
      */
107 107
     private static function getConfigFilePath(string $alias, string $filePath): string
108 108
     {
109
-        $path = DIRECTORY_SEPARATOR . ltrim($filePath, DIRECTORY_SEPARATOR);
109
+        $path = DIRECTORY_SEPARATOR.ltrim($filePath, DIRECTORY_SEPARATOR);
110 110
         $path = Craft::getAlias($alias)
111 111
             . DIRECTORY_SEPARATOR
112 112
             . self::LOCAL_CONFIG_DIR
Please login to merge, or discard this patch.
src/helpers/PluginTemplate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
 
65 65
         // Render the template with our vars passed in
66 66
         try {
67
-            $htmlText = Craft::$app->view->renderTemplate('seomatic/' . $templatePath, $params);
67
+            $htmlText = Craft::$app->view->renderTemplate('seomatic/'.$templatePath, $params);
68 68
             $templateRendered = true;
69 69
         } catch (\Exception $e) {
70 70
             $htmlText = Craft::t(
Please login to merge, or discard this patch.
src/helpers/Schema.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -196,11 +196,11 @@
 block discarded – undo
196 196
         foreach ($typesArray as $key => $value) {
197 197
             $indent = html_entity_decode(str_repeat(' ', $indentLevel));
198 198
             if (\is_array($value)) {
199
-                $result[$key] = $indent . $key;
199
+                $result[$key] = $indent.$key;
200 200
                 $value = self::flattenSchemaArray($value, $indentLevel + self::MENU_INDENT_STEP);
201 201
                 $result = array_merge($result, $value);
202 202
             } else {
203
-                $result[$key] = $indent . $value;
203
+                $result[$key] = $indent.$value;
204 204
             }
205 205
         }
206 206
 
Please login to merge, or discard this patch.
src/helpers/Field.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@
 block discarded – undo
205 205
                 // Prefix the keys with the global set name
206 206
                 $prefix = $global->handle;
207 207
                 $fields = array_combine(
208
-                    array_map(function ($key) use ($prefix) {
208
+                    array_map(function($key) use ($prefix) {
209 209
                         return $prefix.'.'.$key;
210 210
                     }, array_keys($fields)),
211 211
                     $fields
Please login to merge, or discard this patch.
src/models/jsonld/PawnShop.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@
 block discarded – undo
226 226
     {
227 227
         $rules = parent::rules();
228 228
         $rules = array_merge($rules, [
229
-            [['currenciesAccepted','openingHours','paymentAccepted','priceRange'], 'validateJsonSchema'],
229
+            [['currenciesAccepted', 'openingHours', 'paymentAccepted', 'priceRange'], 'validateJsonSchema'],
230 230
             [self::$_googleRequiredSchema, 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'],
231 231
             [self::$_googleRecommendedSchema, 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.']
232 232
         ]);
Please login to merge, or discard this patch.
src/models/jsonld/MeetingRoom.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -164,9 +164,9 @@  discard block
 block discarded – undo
164 164
     static protected $_schemaPropertyExpectedTypes = [
165 165
         'amenityFeature' => ['LocationFeatureSpecification'],
166 166
         'floorSize' => ['QuantitativeValue'],
167
-        'numberOfRooms' => ['Number','QuantitativeValue'],
167
+        'numberOfRooms' => ['Number', 'QuantitativeValue'],
168 168
         'permittedUsage' => ['Text'],
169
-        'petsAllowed' => ['Boolean','Text']
169
+        'petsAllowed' => ['Boolean', 'Text']
170 170
     ];
171 171
 
172 172
     /**
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
     {
241 241
         $rules = parent::rules();
242 242
         $rules = array_merge($rules, [
243
-            [['amenityFeature','floorSize','numberOfRooms','permittedUsage','petsAllowed'], 'validateJsonSchema'],
243
+            [['amenityFeature', 'floorSize', 'numberOfRooms', 'permittedUsage', 'petsAllowed'], 'validateJsonSchema'],
244 244
             [self::$_googleRequiredSchema, 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'],
245 245
             [self::$_googleRecommendedSchema, 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.']
246 246
         ]);
Please login to merge, or discard this patch.