Total Complexity | 4 |
Total Lines | 50 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class BeesWaxSegmentUserData implements JsonSerializable |
||
8 | { |
||
9 | public const USER_ID_TYPE_BEESWAX_COOKIE = 'BEESWAX'; |
||
10 | public const USER_ID_TYPE_CUSTOMER = 'CUSTOMER'; |
||
11 | public const USER_ID_TYPE_IDFA = 'IDFA'; |
||
12 | public const USER_ID_TYPE_IDFA_MD5 = 'IDFA_MD5'; |
||
13 | public const USER_ID_TYPE_IDFA_SHA = 'IDFA_SHA'; |
||
14 | public const USER_ID_TYPE_AD_ID = 'AD_ID'; |
||
15 | public const USER_ID_TYPE_AD_ID_MD5 = 'AD_ID_MD5'; |
||
16 | public const USER_ID_TYPE_AD_ID_SHA = 'AD_ID_SHA'; |
||
17 | public const USER_ID_TYPE_IP_ADDRESS = 'IP_ADDRESS'; |
||
18 | |||
19 | /** @var string */ |
||
20 | protected $userId; |
||
21 | |||
22 | /** @var string[] */ |
||
23 | protected $segments; |
||
24 | |||
25 | /** |
||
26 | * BeesWaxSegmentUserData constructor. |
||
27 | * |
||
28 | * @param string $userId |
||
29 | * @param string[] $segments |
||
30 | * |
||
31 | * @see BeesWaxSegmentUserData::USER_ID_TYPE_* |
||
32 | */ |
||
33 | public function __construct(string $userId, array $segments) |
||
34 | { |
||
35 | $this->userId = $userId; |
||
36 | $this->segments = $segments; |
||
37 | } |
||
38 | |||
39 | public function getUserId(): string |
||
42 | } |
||
43 | |||
44 | public function getSegments(): array |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | */ |
||
52 | public function jsonSerialize() |
||
60 |