@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | Event::on( |
157 | 157 | CraftVariable::class, |
158 | 158 | CraftVariable::EVENT_INIT, |
159 | - function (Event $event) { |
|
159 | + function(Event $event) { |
|
160 | 160 | /** @var CraftVariable $variable */ |
161 | 161 | $variable = $event->sender; |
162 | 162 | $variable->set('instantAnalytics', InstantAnalyticsVariable::class); |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | Event::on( |
174 | 174 | Plugins::class, |
175 | 175 | Plugins::EVENT_AFTER_INSTALL_PLUGIN, |
176 | - function (PluginEvent $event) { |
|
176 | + function(PluginEvent $event) { |
|
177 | 177 | if ($event->plugin === $this) { |
178 | 178 | $request = Craft::$app->getRequest(); |
179 | 179 | if ($request->isCpRequest) { |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | Event::on( |
203 | 203 | UrlManager::class, |
204 | 204 | UrlManager::EVENT_REGISTER_SITE_URL_RULES, |
205 | - function (RegisterUrlRulesEvent $event) { |
|
205 | + function(RegisterUrlRulesEvent $event) { |
|
206 | 206 | Craft::debug( |
207 | 207 | 'UrlManager::EVENT_REGISTER_SITE_URL_RULES', |
208 | 208 | __METHOD__ |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | Event::on( |
219 | 219 | View::class, |
220 | 220 | View::EVENT_BEFORE_RENDER_PAGE_TEMPLATE, |
221 | - function (TemplateEvent $event) { |
|
221 | + function(TemplateEvent $event) { |
|
222 | 222 | self::$currentTemplate = $event->template; |
223 | 223 | } |
224 | 224 | ); |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | Event::on( |
227 | 227 | View::class, |
228 | 228 | View::EVENT_AFTER_RENDER_PAGE_TEMPLATE, |
229 | - function (TemplateEvent $event) { |
|
229 | + function(TemplateEvent $event) { |
|
230 | 230 | $settings = InstantAnalytics::$plugin->getSettings(); |
231 | 231 | if ($settings->autoSendPageView) { |
232 | 232 | $this->sendPageView(); |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | Event::on( |
238 | 238 | UrlManager::class, |
239 | 239 | UrlManager::EVENT_REGISTER_SITE_URL_RULES, |
240 | - function (RegisterUrlRulesEvent $event) { |
|
240 | + function(RegisterUrlRulesEvent $event) { |
|
241 | 241 | $event->rules['instantanalytics/pageViewTrack/<filename:[-\w\.*]+>?'] = |
242 | 242 | 'instant-analytics/track/track-page-view-url'; |
243 | 243 | $event->rules['instantanalytics/eventTrack/<filename:[-\w\.*]+>?'] = |
@@ -192,7 +192,7 @@ |
||
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 |
@@ -113,7 +113,7 @@ |
||
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( |