Passed
Push — develop ( 2dc795...089ff3 )
by Andrew
03:12
created
src/helpers/Field.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@
 block discarded – undo
192 192
                 // Prefix the keys with the global set name
193 193
                 $prefix = $global->handle;
194 194
                 $fields = array_combine(
195
-                    array_map(function ($key) use ($prefix) {
195
+                    array_map(function($key) use ($prefix) {
196 196
                         return $prefix.'.'.$key;
197 197
                     }, array_keys($fields)),
198 198
                     $fields
Please login to merge, or discard this patch.
src/services/IA.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
                 ->setEventCategory($eventCategory)
114 114
                 ->setEventAction($eventAction)
115 115
                 ->setEventLabel($eventLabel)
116
-                ->setEventValue((int)$eventValue);
116
+                ->setEventValue((int) $eventValue);
117 117
             $result = $analytics;
118 118
             Craft::info(
119 119
                 Craft::t(
Please login to merge, or discard this patch.
src/helpers/Manifest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
         $cache = Craft::$app->getCache();
301 301
         $file = $cache->getOrSet(
302 302
             self::CACHE_KEY.$path,
303
-            function () use ($path) {
303
+            function() use ($path) {
304 304
                 $result = null;
305 305
                 $string = @file_get_contents($path);
306 306
                 if ($string) {
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
     protected static function combinePaths(string ...$paths): string
328 328
     {
329 329
         $last_key = \count($paths) - 1;
330
-        array_walk($paths, function (&$val, $key) use ($last_key) {
330
+        array_walk($paths, function(&$val, $key) use ($last_key) {
331 331
             switch ($key) {
332 332
                 case 0:
333 333
                     $val = rtrim($val, '/ ');
Please login to merge, or discard this patch.
src/helpers/IAnalytics.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     {
98 98
         if (InstantAnalytics::$commercePlugin) {
99 99
             if ($productVariant) {
100
-                 InstantAnalytics::$plugin->commerce->addCommerceProductDetailView($this, $productVariant);
100
+                    InstantAnalytics::$plugin->commerce->addCommerceProductDetailView($this, $productVariant);
101 101
             }
102 102
         } else {
103 103
             Craft::warning(
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     {
122 122
         if (InstantAnalytics::$commercePlugin) {
123 123
             if ($orderModel) {
124
-                 InstantAnalytics::$plugin->commerce->addCommerceCheckoutStep($this, $orderModel, $step, $option);
124
+                    InstantAnalytics::$plugin->commerce->addCommerceCheckoutStep($this, $orderModel, $step, $option);
125 125
             }
126 126
         } else {
127 127
             Craft::warning(
Please login to merge, or discard this patch.
src/services/Commerce.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
                 Craft::info(Craft::t(
63 63
                     'instant-analytics',
64 64
                     'orderComplete for `Commerce` - `Purchase` - `{number}` - `{price}`',
65
-                    [ 'number' => $order->number, 'price' => $order->totalPrice ]
65
+                    ['number' => $order->number, 'price' => $order->totalPrice]
66 66
                 ), __METHOD__);
67 67
             }
68 68
         }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                 Craft::info(Craft::t(
91 91
                     'instant-analytics',
92 92
                     'addToCart for `Commerce` - `Add to Cart` - `{title}` - `{quantity}`',
93
-                    [ 'title' => $title, 'quantity' => $quantity ]
93
+                    ['title' => $title, 'quantity' => $quantity]
94 94
                 ), __METHOD__);
95 95
             }
96 96
         }
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
                 Craft::info(Craft::t(
125 125
                     'instant-analytics',
126 126
                     'removeFromCart for `Commerce` - `Remove to Cart` - `{title}` - `{quantity}`',
127
-                    [ 'title' => $title, 'quantity' => $quantity ]
127
+                    ['title' => $title, 'quantity' => $quantity]
128 128
                 ), __METHOD__);
129 129
             }
130 130
         }
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
             Craft::info(Craft::t(
264 264
                 'instant-analytics',
265 265
                 'addCommerceProductImpression for `{sku}` - `{name}` - `{name}` - `{index}`',
266
-                [ 'sku' => $productData['sku'], 'name' => $productData['name'], 'index' => $index ]
266
+                ['sku' => $productData['sku'], 'name' => $productData['name'], 'index' => $index]
267 267
             ), __METHOD__);
268 268
         }
269 269
     }
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
             Craft::info(Craft::t(
291 291
                 'instant-analytics',
292 292
                 'addCommerceProductDetailView for `{sku}` - `{name} - `{name}`',
293
-                [ 'sku' => $productData['sku'], 'name' => $productData['name'] ]
293
+                ['sku' => $productData['sku'], 'name' => $productData['name']]
294 294
             ), __METHOD__);
295 295
         }
296 296
     }
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
             Craft::info(Craft::t(
328 328
                 'instant-analytics',
329 329
                 'addCommerceCheckoutStep step: `{step}` with option: `{option}`',
330
-                [ 'step' => $step, 'option' => $option ]
330
+                ['step' => $step, 'option' => $option]
331 331
             ), __METHOD__);
332 332
         }
333 333
     }
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
                             $name = $cat->title;
481 481
 
482 482
                             while ($cat = $cat->parent) {
483
-                                $name = $cat->title .'/'. $name;
483
+                                $name = $cat->title.'/'.$name;
484 484
                             }
485 485
 
486 486
                             $cats[] = $name;
Please login to merge, or discard this patch.
src/InstantAnalytics.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
         Event::on(
188 188
             CraftVariable::class,
189 189
             CraftVariable::EVENT_INIT,
190
-            function (Event $event) {
190
+            function(Event $event) {
191 191
                 /** @var CraftVariable $variable */
192 192
                 $variable = $event->sender;
193 193
                 $variable->set('instantAnalytics', InstantAnalyticsVariable::class);
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
         Event::on(
205 205
             Plugins::class,
206 206
             Plugins::EVENT_AFTER_INSTALL_PLUGIN,
207
-            function (PluginEvent $event) {
207
+            function(PluginEvent $event) {
208 208
                 if ($event->plugin === $this) {
209 209
                     $request = Craft::$app->getRequest();
210 210
                     if ($request->isCpRequest) {
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
         Event::on(
234 234
             UrlManager::class,
235 235
             UrlManager::EVENT_REGISTER_SITE_URL_RULES,
236
-            function (RegisterUrlRulesEvent $event) {
236
+            function(RegisterUrlRulesEvent $event) {
237 237
                 Craft::debug(
238 238
                     'UrlManager::EVENT_REGISTER_SITE_URL_RULES',
239 239
                     __METHOD__
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
         Event::on(
250 250
             View::class,
251 251
             View::EVENT_BEFORE_RENDER_PAGE_TEMPLATE,
252
-            function (TemplateEvent $event) {
252
+            function(TemplateEvent $event) {
253 253
                 self::$currentTemplate = $event->template;
254 254
             }
255 255
         );
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
         Event::on(
258 258
             View::class,
259 259
             View::EVENT_AFTER_RENDER_PAGE_TEMPLATE,
260
-            function (TemplateEvent $event) {
260
+            function(TemplateEvent $event) {
261 261
                 $settings = InstantAnalytics::$plugin->getSettings();
262 262
                 if ($settings->autoSendPageView) {
263 263
                     $this->sendPageView();
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
         );
267 267
         // Commerce-specific hooks
268 268
         if (self::$commercePlugin) {
269
-            Event::on(Order::class, Order::EVENT_AFTER_COMPLETE_ORDER, function (Event $e) {
269
+            Event::on(Order::class, Order::EVENT_AFTER_COMPLETE_ORDER, function(Event $e) {
270 270
                 $order = $e->sender;
271 271
                 $settings = InstantAnalytics::$plugin->getSettings();
272 272
                 if ($settings->autoSendPurchaseComplete) {
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
                 }
275 275
             });
276 276
 
277
-            Event::on(Order::class, Order::EVENT_AFTER_ADD_LINE_ITEM, function (LineItemEvent $e) {
277
+            Event::on(Order::class, Order::EVENT_AFTER_ADD_LINE_ITEM, function(LineItemEvent $e) {
278 278
                 $lineItem = $e->lineItem;
279 279
                 $settings = InstantAnalytics::$plugin->getSettings();
280 280
                 if ($settings->autoSendAddToCart) {
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 
285 285
             // Check to make sure Order::EVENT_AFTER_REMOVE_LINE_ITEM is defined
286 286
             if (\defined('Order::EVENT_AFTER_REMOVE_LINE_ITEM')) {
287
-                Event::on(Order::class, Order::EVENT_AFTER_REMOVE_LINE_ITEM, function (LineItemEvent $e) {
287
+                Event::on(Order::class, Order::EVENT_AFTER_REMOVE_LINE_ITEM, function(LineItemEvent $e) {
288 288
                     $lineItem = $e->lineItem;
289 289
                     $settings = InstantAnalytics::$plugin->getSettings();
290 290
                     if ($settings->autoSendRemoveFromCart) {
Please login to merge, or discard this patch.