@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | ->setEventCategory($eventCategory) |
| 120 | 120 | ->setEventAction($eventAction) |
| 121 | 121 | ->setEventLabel($eventLabel) |
| 122 | - ->setEventValue((int)$eventValue); |
|
| 122 | + ->setEventValue((int) $eventValue); |
|
| 123 | 123 | $result = $analytics; |
| 124 | 124 | Craft::info( |
| 125 | 125 | Craft::t( |
@@ -519,7 +519,7 @@ discard block |
||
| 519 | 519 | $cid = $_COOKIE['_ia']; |
| 520 | 520 | } else { |
| 521 | 521 | // Only generate our own unique clientId if `requireGaCookieClientId` isn't true |
| 522 | - if (!InstantAnalytics::$settings->requireGaCookieClientId) { |
|
| 522 | + if (!InstantAnalytics::$settings->requireGaCookieClientId) { |
|
| 523 | 523 | $cid = $this->gaGenUUID(); |
| 524 | 524 | } |
| 525 | 525 | } |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | Event::on( |
| 199 | 199 | CraftVariable::class, |
| 200 | 200 | CraftVariable::EVENT_INIT, |
| 201 | - function (Event $event) { |
|
| 201 | + function(Event $event) { |
|
| 202 | 202 | /** @var CraftVariable $variable */ |
| 203 | 203 | $variable = $event->sender; |
| 204 | 204 | $variable->set('instantAnalytics', InstantAnalyticsVariable::class); |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | Event::on( |
| 216 | 216 | Plugins::class, |
| 217 | 217 | Plugins::EVENT_AFTER_INSTALL_PLUGIN, |
| 218 | - function (PluginEvent $event) { |
|
| 218 | + function(PluginEvent $event) { |
|
| 219 | 219 | if ($event->plugin === $this) { |
| 220 | 220 | $request = Craft::$app->getRequest(); |
| 221 | 221 | if ($request->isCpRequest) { |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | Event::on( |
| 245 | 245 | UrlManager::class, |
| 246 | 246 | UrlManager::EVENT_REGISTER_SITE_URL_RULES, |
| 247 | - function (RegisterUrlRulesEvent $event) { |
|
| 247 | + function(RegisterUrlRulesEvent $event) { |
|
| 248 | 248 | Craft::debug( |
| 249 | 249 | 'UrlManager::EVENT_REGISTER_SITE_URL_RULES', |
| 250 | 250 | __METHOD__ |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | Event::on( |
| 261 | 261 | View::class, |
| 262 | 262 | View::EVENT_BEFORE_RENDER_PAGE_TEMPLATE, |
| 263 | - function (TemplateEvent $event) { |
|
| 263 | + function(TemplateEvent $event) { |
|
| 264 | 264 | self::$currentTemplate = $event->template; |
| 265 | 265 | } |
| 266 | 266 | ); |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | Event::on( |
| 269 | 269 | View::class, |
| 270 | 270 | View::EVENT_AFTER_RENDER_PAGE_TEMPLATE, |
| 271 | - function (TemplateEvent $event) { |
|
| 271 | + function(TemplateEvent $event) { |
|
| 272 | 272 | if (self::$settings->autoSendPageView) { |
| 273 | 273 | $this->sendPageView(); |
| 274 | 274 | } |
@@ -276,14 +276,14 @@ discard block |
||
| 276 | 276 | ); |
| 277 | 277 | // Commerce-specific hooks |
| 278 | 278 | if (self::$commercePlugin) { |
| 279 | - Event::on(Order::class, Order::EVENT_AFTER_COMPLETE_ORDER, function (Event $e) { |
|
| 279 | + Event::on(Order::class, Order::EVENT_AFTER_COMPLETE_ORDER, function(Event $e) { |
|
| 280 | 280 | $order = $e->sender; |
| 281 | 281 | if (self::$settings->autoSendPurchaseComplete) { |
| 282 | 282 | $this->commerce->orderComplete($order); |
| 283 | 283 | } |
| 284 | 284 | }); |
| 285 | 285 | |
| 286 | - Event::on(Order::class, Order::EVENT_AFTER_ADD_LINE_ITEM, function (LineItemEvent $e) { |
|
| 286 | + Event::on(Order::class, Order::EVENT_AFTER_ADD_LINE_ITEM, function(LineItemEvent $e) { |
|
| 287 | 287 | $lineItem = $e->lineItem; |
| 288 | 288 | if (self::$settings->autoSendAddToCart) { |
| 289 | 289 | $this->commerce->addToCart($lineItem->order, $lineItem); |
@@ -291,8 +291,8 @@ discard block |
||
| 291 | 291 | }); |
| 292 | 292 | |
| 293 | 293 | // Check to make sure Order::EVENT_AFTER_REMOVE_LINE_ITEM is defined |
| 294 | - if (defined(Order::class . '::EVENT_AFTER_REMOVE_LINE_ITEM')) { |
|
| 295 | - Event::on(Order::class, Order::EVENT_AFTER_REMOVE_LINE_ITEM, function (LineItemEvent $e) { |
|
| 294 | + if (defined(Order::class.'::EVENT_AFTER_REMOVE_LINE_ITEM')) { |
|
| 295 | + Event::on(Order::class, Order::EVENT_AFTER_REMOVE_LINE_ITEM, function(LineItemEvent $e) { |
|
| 296 | 296 | $lineItem = $e->lineItem; |
| 297 | 297 | if (self::$settings->autoSendRemoveFromCart) { |
| 298 | 298 | $this->commerce->removeFromCart($lineItem->order, $lineItem); |