@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | * @param string $listName |
| 180 | 180 | * @throws \yii\base\InvalidConfigException |
| 181 | 181 | */ |
| 182 | - public function addCommerceProductImpression(Product|Variant $productVariant, int $index = 0, string $listName = 'default') { |
|
| 182 | + public function addCommerceProductImpression(Product | Variant $productVariant, int $index = 0, string $listName = 'default') { |
|
| 183 | 183 | InstantAnalytics::$plugin->commerce->addCommerceProductImpression($productVariant); |
| 184 | 184 | } |
| 185 | 185 | |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | * @throws \yii\base\InvalidConfigException |
| 193 | 193 | *@deprecated `Analytics::addCommerceProductDetailView()` is deprecated. Use `Analytics::addCommerceProductImpression()` instead. |
| 194 | 194 | */ |
| 195 | - public function addCommerceProductDetailView(Product|Variant $productVariant, int $index = 0, string $listName = 'default') { |
|
| 195 | + public function addCommerceProductDetailView(Product | Variant $productVariant, int $index = 0, string $listName = 'default') { |
|
| 196 | 196 | Craft::$app->getDeprecator()->log('Analytics::addCommerceProductDetailView()', '`Analytics::addCommerceProductDetailView()` is deprecated. Use `Analytics::addCommerceProductImpression()` instead.'); |
| 197 | 197 | $this->addCommerceProductImpression($productVariant); |
| 198 | 198 | } |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | // Load them up for GA4 |
| 339 | 339 | foreach ($campaignParams as $key => $method) { |
| 340 | 340 | $value = $request->getParam($key) ?? $session->get($key) ?? null; |
| 341 | - $method = 'set' . $method; |
|
| 341 | + $method = 'set'.$method; |
|
| 342 | 342 | |
| 343 | 343 | $this->$method($value); |
| 344 | 344 | |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | * @param Product|Variant $productVariant the Product or Variant |
| 211 | 211 | * @throws \yii\base\InvalidConfigException |
| 212 | 212 | */ |
| 213 | - public function addCommerceProductImpression(Variant|Product $productVariant): void |
|
| 213 | + public function addCommerceProductImpression(Variant | Product $productVariant): void |
|
| 214 | 214 | { |
| 215 | 215 | if ($productVariant) { |
| 216 | 216 | $event = InstantAnalytics::$plugin->ga4->getAnalytics()->create()->ViewItemEvent(); |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | * |
| 260 | 260 | * @throws \yii\base\InvalidConfigException |
| 261 | 261 | */ |
| 262 | - protected function addProductDataFromProductOrVariant(ItemBaseEvent $event, Variant|Product $productVariant = null, $index = null, $listName = ''): void |
|
| 262 | + protected function addProductDataFromProductOrVariant(ItemBaseEvent $event, Variant | Product $productVariant = null, $index = null, $listName = ''): void |
|
| 263 | 263 | { |
| 264 | 264 | $eventItem = $this->getNewItemParameter(); |
| 265 | 265 | |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | $name = $cat->title; |
| 387 | 387 | |
| 388 | 388 | while ($cat = $cat->parent) { |
| 389 | - $name = $cat->title . '/' . $name; |
|
| 389 | + $name = $cat->title.'/'.$name; |
|
| 390 | 390 | } |
| 391 | 391 | |
| 392 | 392 | $cats[] = $name; |