Passed
Push — v3 ( 4358aa...b8a538 )
by Andrew
05:33
created
src/base/FluentModel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
                 return $property->getValue();
50 50
             } else {
51 51
                 // Set the property
52
-                $property->setValue($this, $args[0]);
52
+                $property->setValue($this, $args[ 0 ]);
53 53
                 // Make it chainable
54 54
                 return $this;
55 55
             }
Please login to merge, or discard this patch.
src/base/MetaContainerInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,5 +33,5 @@
 block discarded – undo
33 33
      *
34 34
      * @return array
35 35
      */
36
-    public function renderArray($params = []): array;
36
+    public function renderArray($params = [ ]): array;
37 37
 }
Please login to merge, or discard this patch.
src/base/MetaItem.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -56,11 +56,11 @@  discard block
 block discarded – undo
56 56
     {
57 57
         $rules = parent::rules();
58 58
         $rules = array_merge($rules, [
59
-            [['include', 'key'], 'required'],
60
-            [['include'], 'boolean'],
61
-            [['key'], 'string'],
62
-            [['environment'], 'safe'],
63
-            [['dependencies'], 'safe'],
59
+            [ [ 'include', 'key' ], 'required' ],
60
+            [ [ 'include' ], 'boolean' ],
61
+            [ [ 'key' ], 'string' ],
62
+            [ [ 'environment' ], 'safe' ],
63
+            [ [ 'dependencies' ], 'safe' ],
64 64
         ]);
65 65
 
66 66
         return $rules;
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     /**
110 110
      * @inheritdoc
111 111
      */
112
-    public function render($params = []): string
112
+    public function render($params = [ ]): string
113 113
     {
114 114
         $html = '';
115 115
 
@@ -119,9 +119,9 @@  discard block
 block discarded – undo
119 119
     /**
120 120
      * @inheritdoc
121 121
      */
122
-    public function renderAttributes($params = []): array
122
+    public function renderAttributes($params = [ ]): array
123 123
     {
124
-        $attributes = [];
124
+        $attributes = [ ];
125 125
 
126 126
         return $attributes;
127 127
     }
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      */
135 135
     public function debugMetaItem(
136 136
         $errorLabel = "Error: ",
137
-        $scenarios = ['default' => 'error']
137
+        $scenarios = [ 'default' => 'error' ]
138 138
     ) {
139 139
         $isMetaJsonLdModel = false;
140 140
         if (is_subclass_of($this, MetaJsonLd::class)) {
@@ -178,10 +178,10 @@  discard block
 block discarded – undo
178 178
                     if ($isMetaJsonLdModel) {
179 179
                         /** @var  $className MetaJsonLd */
180 180
                         $className = get_class($this);
181
-                        if (!empty($className::$schemaPropertyDescriptions[$param])) {
181
+                        if (!empty($className::$schemaPropertyDescriptions[ $param ])) {
182 182
                             $errorMsg = Craft::t('seomatic', $errorLabel) . $param;
183 183
                             /** @var $className MetaJsonLd */
184
-                            $errorMsg .= ' -> ' . $className::$schemaPropertyDescriptions[$param];
184
+                            $errorMsg .= ' -> ' . $className::$schemaPropertyDescriptions[ $param ];
185 185
                             Craft::info($errorMsg, __METHOD__);
186 186
                         }
187 187
                     }
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
      */
215 215
     public function tagAttributesArray(): array
216 216
     {
217
-        $result = [];
217
+        $result = [ ];
218 218
         $optionsCount = 1;
219 219
         $scenario = $this->scenario;
220 220
         $this->setScenario('render');
@@ -223,19 +223,19 @@  discard block
 block discarded – undo
223 223
 
224 224
         // See if any of the potentially array properties actually are
225 225
         foreach (static::ARRAY_PROPERTIES as $arrayProperty) {
226
-            if (!empty($options[$arrayProperty]) && is_array($options[$arrayProperty])) {
227
-                $optionsCount = count($options[$arrayProperty]) > $optionsCount
228
-                    ? count($options[$arrayProperty]) : $optionsCount;
226
+            if (!empty($options[ $arrayProperty ]) && is_array($options[ $arrayProperty ])) {
227
+                $optionsCount = count($options[ $arrayProperty ]) > $optionsCount
228
+                    ? count($options[ $arrayProperty ]) : $optionsCount;
229 229
             }
230 230
         }
231 231
         // Return an array of resulting options
232 232
         while ($optionsCount--) {
233 233
             $resultOptions = $options;
234 234
             foreach ($resultOptions as $key => $value) {
235
-                $resultOptions[$key] = (is_array($value) && isset($value[$optionsCount]))
236
-                    ? $value[$optionsCount] : $value;
235
+                $resultOptions[ $key ] = (is_array($value) && isset($value[ $optionsCount ]))
236
+                    ? $value[ $optionsCount ] : $value;
237 237
             }
238
-            $result[] = $resultOptions;
238
+            $result[ ] = $resultOptions;
239 239
         }
240 240
 
241 241
         return $result;
Please login to merge, or discard this patch.
src/base/MetaContainerTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,5 +26,5 @@
 block discarded – undo
26 26
      *
27 27
      * @var MetaItem
28 28
      */
29
-    public $data = [];
29
+    public $data = [ ];
30 30
 }
Please login to merge, or discard this patch.
src/base/ContainerTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,5 +56,5 @@
 block discarded – undo
56 56
      *
57 57
      * @var array
58 58
      */
59
-    public $data = [];
59
+    public $data = [ ];
60 60
 }
Please login to merge, or discard this patch.
src/base/MetaItemInterface.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      *
44 44
      * @return string The rendered meta item
45 45
      */
46
-    public function render($params = []): string;
46
+    public function render($params = [ ]): string;
47 47
 
48 48
     /**
49 49
      * Render the meta item as an array of attributes
@@ -52,6 +52,6 @@  discard block
 block discarded – undo
52 52
      *
53 53
      * @return array
54 54
      */
55
-    public function renderAttributes($params = []): array;
55
+    public function renderAttributes($params = [ ]): array;
56 56
 
57 57
 }
Please login to merge, or discard this patch.
src/base/FrontendTemplate.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
     {
39 39
         $rules = parent::rules();
40 40
         $rules = array_merge($rules, [
41
-            [['path', 'controller', 'action'], 'required'],
42
-            [['path', 'controller', 'action'], 'string'],
41
+            [ [ 'path', 'controller', 'action' ], 'required' ],
42
+            [ [ 'path', 'controller', 'action' ], 'string' ],
43 43
         ]);
44 44
 
45 45
         return $rules;
@@ -50,14 +50,14 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function routeRules(): array
52 52
     {
53
-        $rules = [];
53
+        $rules = [ ];
54 54
         $route =
55 55
             Seomatic::$plugin->handle
56 56
             . '/'
57 57
             . $this->controller
58 58
             . '/'
59 59
             . $this->action;
60
-        $rules[$this->path] = ['route' => $route];
60
+        $rules[ $this->path ] = [ 'route' => $route ];
61 61
 
62 62
         return $rules;
63 63
     }
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     /**
66 66
      * @inheritdoc
67 67
      */
68
-    public function render($params = []): string
68
+    public function render($params = [ ]): string
69 69
     {
70 70
         $html = PluginTemplate::renderPluginTemplate($this->path, $params);
71 71
 
Please login to merge, or discard this patch.
src/base/FrontendTemplateInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,5 +41,5 @@
 block discarded – undo
41 41
      *
42 42
      * @return string
43 43
      */
44
-    public function render($params = []): string;
44
+    public function render($params = [ ]): string;
45 45
 }
Please login to merge, or discard this patch.
src/base/MetaServiceInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
      *
40 40
      * @return MetaItem
41 41
      */
42
-    public function create($config = [], $add = true);
42
+    public function create($config = [ ], $add = true);
43 43
 
44 44
     /**
45 45
      * Add a meta item to its appropriate container
Please login to merge, or discard this patch.