| Total Complexity | 7 |
| Total Lines | 96 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | class ThirdPartyUser |
||
| 17 | { |
||
| 18 | const ID = 'id'; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | private $id; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var string |
||
| 27 | */ |
||
| 28 | private $name; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @var string |
||
| 32 | */ |
||
| 33 | private $email; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @var string |
||
| 37 | */ |
||
| 38 | private $avatar; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @var string |
||
| 42 | */ |
||
| 43 | private $gender; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param string $id vendor unique identifier |
||
| 47 | * @param string $name user's name within the vendor platform |
||
| 48 | * @param string $email user's email within the vendor platform |
||
| 49 | * @param string $avatar [optional] user's profile picture within the vendor platform if any provided |
||
| 50 | * @param string $gender [optional] user's gender within the vendor platform if any provided |
||
| 51 | */ |
||
| 52 | 9 | public function __construct($id, $name, $email, $avatar = '', $gender = '') |
|
| 53 | { |
||
| 54 | 9 | $this->id = $id; |
|
| 55 | 9 | $this->name = $name; |
|
| 56 | 9 | $this->email = $email; |
|
| 57 | 9 | $this->avatar = $avatar; |
|
| 58 | 9 | $this->gender = $gender; |
|
| 59 | 9 | } |
|
| 60 | |||
| 61 | /** |
||
| 62 | * @return string |
||
| 63 | */ |
||
| 64 | 2 | public function id() |
|
| 65 | { |
||
| 66 | 2 | return $this->id; |
|
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @return string |
||
| 71 | */ |
||
| 72 | 2 | public function name() |
|
| 73 | { |
||
| 74 | 2 | return $this->name; |
|
| 75 | } |
||
| 76 | |||
| 77 | /** |
||
| 78 | * @return string |
||
| 79 | */ |
||
| 80 | 9 | public function email() |
|
| 81 | { |
||
| 82 | 9 | return $this->email; |
|
| 83 | } |
||
| 84 | |||
| 85 | /** |
||
| 86 | * @return string |
||
| 87 | */ |
||
| 88 | 2 | public function avatar() |
|
| 91 | } |
||
| 92 | |||
| 93 | /** |
||
| 94 | * @return string |
||
| 95 | */ |
||
| 96 | 2 | public function gender() |
|
| 99 | } |
||
| 100 | |||
| 101 | /** |
||
| 102 | * @return array |
||
| 103 | */ |
||
| 104 | 1 | public function toArray() |
|
| 112 | 1 | ); |
|
| 113 | } |
||
| 114 | } |
||
| 115 |