@@ -62,7 +62,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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; |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | Event::on( |
186 | 186 | CraftVariable::class, |
187 | 187 | CraftVariable::EVENT_INIT, |
188 | - function (Event $event) { |
|
188 | + function(Event $event) { |
|
189 | 189 | /** @var CraftVariable $variable */ |
190 | 190 | $variable = $event->sender; |
191 | 191 | $variable->set('instantAnalytics', InstantAnalyticsVariable::class); |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | Event::on( |
203 | 203 | Plugins::class, |
204 | 204 | Plugins::EVENT_AFTER_INSTALL_PLUGIN, |
205 | - function (PluginEvent $event) { |
|
205 | + function(PluginEvent $event) { |
|
206 | 206 | if ($event->plugin === $this) { |
207 | 207 | $request = Craft::$app->getRequest(); |
208 | 208 | if ($request->isCpRequest) { |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | Event::on( |
232 | 232 | UrlManager::class, |
233 | 233 | UrlManager::EVENT_REGISTER_SITE_URL_RULES, |
234 | - function (RegisterUrlRulesEvent $event) { |
|
234 | + function(RegisterUrlRulesEvent $event) { |
|
235 | 235 | Craft::debug( |
236 | 236 | 'UrlManager::EVENT_REGISTER_SITE_URL_RULES', |
237 | 237 | __METHOD__ |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | Event::on( |
248 | 248 | View::class, |
249 | 249 | View::EVENT_BEFORE_RENDER_PAGE_TEMPLATE, |
250 | - function (TemplateEvent $event) { |
|
250 | + function(TemplateEvent $event) { |
|
251 | 251 | self::$currentTemplate = $event->template; |
252 | 252 | } |
253 | 253 | ); |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | Event::on( |
256 | 256 | View::class, |
257 | 257 | View::EVENT_AFTER_RENDER_PAGE_TEMPLATE, |
258 | - function (TemplateEvent $event) { |
|
258 | + function(TemplateEvent $event) { |
|
259 | 259 | $settings = InstantAnalytics::$plugin->getSettings(); |
260 | 260 | if ($settings->autoSendPageView) { |
261 | 261 | $this->sendPageView(); |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | ); |
265 | 265 | // Commerce-specific hooks |
266 | 266 | if (self::$commercePlugin) { |
267 | - Event::on(Order::class, Order::EVENT_AFTER_COMPLETE_ORDER, function (Event $e) { |
|
267 | + Event::on(Order::class, Order::EVENT_AFTER_COMPLETE_ORDER, function(Event $e) { |
|
268 | 268 | $order = $e->sender; |
269 | 269 | $settings = InstantAnalytics::$plugin->getSettings(); |
270 | 270 | |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | } |
274 | 274 | }); |
275 | 275 | |
276 | - Event::on(Order::class, Order::EVENT_AFTER_ADD_LINE_ITEM, function (Event $e) { |
|
276 | + Event::on(Order::class, Order::EVENT_AFTER_ADD_LINE_ITEM, function(Event $e) { |
|
277 | 277 | $lineItem = $e->lineItem; |
278 | 278 | |
279 | 279 | $settings = InstantAnalytics::$plugin->getSettings(); |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | } |
284 | 284 | }); |
285 | 285 | |
286 | - Event::on(Order::class, Order::EVENT_AFTER_REMOVE_LINE_ITEM, function (Event $e) { |
|
286 | + Event::on(Order::class, Order::EVENT_AFTER_REMOVE_LINE_ITEM, function(Event $e) { |
|
287 | 287 | $lineItem = $e->lineItem; |
288 | 288 | |
289 | 289 | $settings = InstantAnalytics::$plugin->getSettings(); |