Conditions | 5 |
Paths | 5 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
59 | public function validate() |
||
60 | { |
||
61 | if ($this->version === null) { |
||
62 | throw new LPTrackerSDKException('Visitor version is required'); |
||
63 | } |
||
64 | |||
65 | if (empty($this->fingerprint)) { |
||
66 | throw new LPTrackerSDKException('Visitor fingerprint is required'); |
||
67 | } |
||
68 | |||
69 | if (empty($this->browser)) { |
||
70 | throw new LPTrackerSDKException('Visitor user agent is required'); |
||
71 | } |
||
72 | |||
73 | if (empty($this->ip)) { |
||
74 | throw new LPTrackerSDKException('Visitor IP is required'); |
||
75 | } |
||
76 | |||
77 | return true; |
||
78 | } |
||
79 | } |
||
80 |