Passed
Push — develop ( 240327...4ddf62 )
by Andrew
01:20
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/InstantAnalytics.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         Event::on(
182 182
             CraftVariable::class,
183 183
             CraftVariable::EVENT_INIT,
184
-            function (Event $event) {
184
+            function(Event $event) {
185 185
                 /** @var CraftVariable $variable */
186 186
                 $variable = $event->sender;
187 187
                 $variable->set('instantAnalytics', InstantAnalyticsVariable::class);
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         Event::on(
199 199
             Plugins::class,
200 200
             Plugins::EVENT_AFTER_INSTALL_PLUGIN,
201
-            function (PluginEvent $event) {
201
+            function(PluginEvent $event) {
202 202
                 if ($event->plugin === $this) {
203 203
                     $request = Craft::$app->getRequest();
204 204
                     if ($request->isCpRequest) {
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
         Event::on(
228 228
             UrlManager::class,
229 229
             UrlManager::EVENT_REGISTER_SITE_URL_RULES,
230
-            function (RegisterUrlRulesEvent $event) {
230
+            function(RegisterUrlRulesEvent $event) {
231 231
                 Craft::debug(
232 232
                     'UrlManager::EVENT_REGISTER_SITE_URL_RULES',
233 233
                     __METHOD__
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
         Event::on(
244 244
             View::class,
245 245
             View::EVENT_BEFORE_RENDER_PAGE_TEMPLATE,
246
-            function (TemplateEvent $event) {
246
+            function(TemplateEvent $event) {
247 247
                 self::$currentTemplate = $event->template;
248 248
             }
249 249
         );
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
         Event::on(
252 252
             View::class,
253 253
             View::EVENT_AFTER_RENDER_PAGE_TEMPLATE,
254
-            function (TemplateEvent $event) {
254
+            function(TemplateEvent $event) {
255 255
                 $settings = InstantAnalytics::$plugin->getSettings();
256 256
                 if ($settings->autoSendPageView) {
257 257
                     $this->sendPageView();
Please login to merge, or discard this patch.
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -126,17 +126,17 @@
 block discarded – undo
126 126
         $commerceFields = [];
127 127
 
128 128
         if (self::$commercePlugin) {
129
-             $productTypes = Commerce::getInstance()->getProductTypes()->getAllProductTypes();
129
+                $productTypes = Commerce::getInstance()->getProductTypes()->getAllProductTypes();
130 130
 
131
-             foreach ($productTypes as $productType) {
132
-                 $productFields = $this->_getPullFieldsFromLayoutId($productType->fieldLayoutId);
133
-                 $commerceFields = array_merge($commerceFields, $productFields);
131
+                foreach ($productTypes as $productType) {
132
+                    $productFields = $this->_getPullFieldsFromLayoutId($productType->fieldLayoutId);
133
+                    $commerceFields = array_merge($commerceFields, $productFields);
134 134
                  
135
-                 if ($productType->hasVariants) {
136
-                     $variantFields = $this->_getPullFieldsFromLayoutId($productType->variantFieldLayoutId);
137
-                     $commerceFields = array_merge($commerceFields, $variantFields);
138
-                 }
139
-             }
135
+                    if ($productType->hasVariants) {
136
+                        $variantFields = $this->_getPullFieldsFromLayoutId($productType->variantFieldLayoutId);
137
+                        $commerceFields = array_merge($commerceFields, $variantFields);
138
+                    }
139
+                }
140 140
         }
141 141
 
142 142
         // Rend the settings template
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
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
                 $analytics->setProductActionToPurchase();
54 54
                 $analytics->sendEvent();
55 55
 
56
-                Craft::info(Craft::t('instant-analytics', 'orderComplete for `Commerce` - `Purchase` - `{number}` - `{price}`', [ 'number' => $order->number, 'price' => $order->totalPrice ]), __METHOD__);
56
+                Craft::info(Craft::t('instant-analytics', 'orderComplete for `Commerce` - `Purchase` - `{number}` - `{price}`', ['number' => $order->number, 'price' => $order->totalPrice]), __METHOD__);
57 57
             }
58 58
         }
59 59
     }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                 $analytics->setProductActionToAdd();
78 78
                 $analytics->sendEvent();
79 79
 
80
-                Craft::info(Craft::t('instant-analytics', 'addToCart for `Commerce` - `Add to Cart` - `{title}` - `{quantity}`', [ 'title' => $title, 'quantity' => $quantity ]), __METHOD__);
80
+                Craft::info(Craft::t('instant-analytics', 'addToCart for `Commerce` - `Add to Cart` - `{title}` - `{quantity}`', ['title' => $title, 'quantity' => $quantity]), __METHOD__);
81 81
             }
82 82
         }
83 83
     }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                 $analytics->setProductActionToRemove();
100 100
                 $analytics->sendEvent();
101 101
 
102
-                Craft::info(Craft::t('instant-analytics', 'removeFromCart for `Commerce` - `Remove to Cart` - `{title}` - `{quantity}`', [ 'title' => $title, 'quantity' => $quantity ]), __METHOD__);
102
+                Craft::info(Craft::t('instant-analytics', 'removeFromCart for `Commerce` - `Remove to Cart` - `{title}` - `{quantity}`', ['title' => $title, 'quantity' => $quantity]), __METHOD__);
103 103
             }
104 104
         }
105 105
     }
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
             //Add the product to the hit to be sent
224 224
             $analytics->addProductImpression($productData, $listIndex);
225 225
 
226
-            Craft::info(Craft::t('instant-analytics', "addCommerceProductImpression for `{sku}` - `{name}` - `{name}` - `{index}`", [ 'sku' => $productData['sku'], 'name' => $productData['name'], 'index' => $index ]), __METHOD__);
226
+            Craft::info(Craft::t('instant-analytics', "addCommerceProductImpression for `{sku}` - `{name}` - `{name}` - `{index}`", ['sku' => $productData['sku'], 'name' => $productData['name'], 'index' => $index]), __METHOD__);
227 227
         }
228 228
     }
229 229
 
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
             //Add the product to the hit to be sent
244 244
             $analytics->addProduct($productData);
245 245
 
246
-            Craft::info(Craft::t('instant-analytics', "addCommerceProductDetailView for `{sku}` - `{name} - `{name}`", [ 'sku' => $productData['sku'], 'name' => $productData['name'] ]), __METHOD__);
246
+            Craft::info(Craft::t('instant-analytics', "addCommerceProductDetailView for `{sku}` - `{name} - `{name}`", ['sku' => $productData['sku'], 'name' => $productData['name']]), __METHOD__);
247 247
         }
248 248
     }
249 249
 
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
             // Don't forget to set the product action, in this case to CHECKOUT
276 276
             $analytics->setProductActionToCheckout();
277 277
 
278
-            Craft::info(Craft::t('instant-analytics', "addCommerceCheckoutStep step: `{step}` with option: `{option}`", [ 'step' => $step, 'option' => $option ]), __METHOD__);
278
+            Craft::info(Craft::t('instant-analytics', "addCommerceCheckoutStep step: `{step}` with option: `{option}`", ['step' => $step, 'option' => $option]), __METHOD__);
279 279
         }
280 280
     }
281 281
 
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
                                 $name = $cat->title;
419 419
 
420 420
                                 while ($cat = $cat->parent) {
421
-                                    $name = $cat->title . "/" . $name;
421
+                                    $name = $cat->title."/".$name;
422 422
                                 }
423 423
 
424 424
                                 $cats[] = $name;
Please login to merge, or discard this patch.