| Total Complexity | 10 |
| Total Lines | 98 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | final class Authentication implements Emptiable, ObjectSerializable |
||
| 10 | { |
||
| 11 | use EmptiableTrait; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @var string |
||
| 15 | */ |
||
| 16 | private $identification; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | private $partner; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | private $apiKey; |
||
| 27 | |||
| 28 | public function __construct($identification, $apiKey = null) |
||
| 29 | { |
||
| 30 | $this->identification = $identification; |
||
| 31 | $this->apiKey = $apiKey; |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @return string |
||
| 36 | */ |
||
| 37 | public function getIdentification() |
||
| 38 | { |
||
| 39 | return $this->identification; |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param string $identification |
||
| 44 | */ |
||
| 45 | public function setIdentification($identification) |
||
| 46 | { |
||
| 47 | $this->identification = substr((string) $identification, 0, 50); |
||
| 48 | |||
| 49 | return $this; |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @return string |
||
| 54 | */ |
||
| 55 | public function getPartner() |
||
| 56 | { |
||
| 57 | return $this->partner; |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @param string $partner |
||
| 62 | */ |
||
| 63 | public function setPartner($partner) |
||
| 64 | { |
||
| 65 | $this->partner = substr((string) $partner, 0, 50); |
||
| 66 | |||
| 67 | return $this; |
||
| 68 | } |
||
| 69 | |||
| 70 | /** |
||
| 71 | * @return string |
||
| 72 | */ |
||
| 73 | public function getApiKey() |
||
| 74 | { |
||
| 75 | return $this->apiKey; |
||
| 76 | } |
||
| 77 | |||
| 78 | /** |
||
| 79 | * @param string $apiKey |
||
| 80 | */ |
||
| 81 | public function setApiKey($apiKey) |
||
| 86 | } |
||
| 87 | |||
| 88 | /** |
||
| 89 | * @return bool |
||
| 90 | */ |
||
| 91 | public function hasPartner() |
||
| 92 | { |
||
| 94 | } |
||
| 95 | |||
| 96 | public function serialize() |
||
| 109 |