Skip to content

Commit f854a0c

Browse files
authored
Add PHPDocblock (#52)
2 parents 5ae75f6 + d9d276e commit f854a0c

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

src/Analytics.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
use AlexWestergaard\PhpGa4\Facade;
88
use AlexWestergaard\PhpGa4\Exception\Ga4Exception;
99

10+
/**
11+
* Analytics wrapper to contain UserProperties and Events to post on Google Analytics
12+
*/
1013
class Analytics extends Helper\IOHelper implements Facade\Type\AnalyticsType
1114
{
1215
private Guzzle $guzzle;

src/Item.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
use AlexWestergaard\PhpGa4\Helper;
66
use AlexWestergaard\PhpGa4\Facade;
77

8+
/**
9+
* Structured items for events that touch products
10+
*/
811
class Item extends Helper\IOHelper implements Facade\Type\ItemType
912
{
1013
protected null|string $item_id;

src/UserProperty.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,34 @@
44

55
use AlexWestergaard\PhpGa4\Helper;
66

7+
/**
8+
* UserProperty allows you to add session/client properties that is not related to individual events
9+
* such as if they are a premium member or from a certain country perhaps.
10+
*/
711
class UserProperty extends Helper\UserPropertyHelper
812
{
913
protected null|string $name;
1014
protected null|int|float|string $value;
1115

16+
/**
17+
* Set the name of the UserProperty
18+
*
19+
* @param string $name
20+
*
21+
* @return static
22+
*/
23+
public function setName(string $name): static
24+
{
25+
return parent::setName($name);
26+
}
27+
28+
/**
29+
* Set the value of the UserProperty
30+
*
31+
* @param int|float|string $value
32+
*
33+
* @return static
34+
*/
1235
public function setValue(int|float|string $value): static
1336
{
1437
$this->value = $value;

0 commit comments

Comments
 (0)