Total Complexity | 8 |
Total Lines | 93 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
7 | class Referral |
||
8 | { |
||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | protected $source; |
||
13 | |||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $type; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $adId; |
||
23 | |||
24 | /** |
||
25 | * @var null|string |
||
26 | */ |
||
27 | protected $ref; |
||
28 | |||
29 | /** |
||
30 | * Referral constructor. |
||
31 | * |
||
32 | * @param string $source |
||
33 | * @param string $type |
||
34 | * @param string $adId |
||
35 | */ |
||
36 | public function __construct(string $source, string $type, string $adId) |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * @return string |
||
45 | */ |
||
46 | public function getSource(): string |
||
47 | { |
||
48 | return $this->source; |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * @return string |
||
53 | */ |
||
54 | public function getType(): string |
||
55 | { |
||
56 | return $this->type; |
||
57 | } |
||
58 | |||
59 | /** |
||
60 | * @return string |
||
61 | */ |
||
62 | public function getAdId(): string |
||
65 | } |
||
66 | |||
67 | /** |
||
68 | * @return null|string |
||
69 | */ |
||
70 | public function getRef(): ?string |
||
73 | } |
||
74 | |||
75 | /** |
||
76 | * @param string $ref |
||
77 | * |
||
78 | * @return \Kerox\Messenger\Model\Referral |
||
79 | */ |
||
80 | public function setRef(string $ref): self |
||
81 | { |
||
82 | $this->ref = $ref; |
||
83 | |||
84 | return $this; |
||
85 | } |
||
86 | |||
87 | /** |
||
88 | * @param array $referral |
||
89 | * |
||
90 | * @return \Kerox\Messenger\Model\Referral |
||
91 | */ |
||
92 | public static function create(array $referral): self |
||
100 | } |
||
101 | } |
||
102 |