| Total Complexity | 12 |
| Total Lines | 70 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class KobasResourceOwner implements ResourceOwnerInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Raw response |
||
| 11 | * |
||
| 12 | * @var array |
||
| 13 | */ |
||
| 14 | protected $response; |
||
| 15 | /** |
||
| 16 | * Creates new resource owner. |
||
| 17 | * |
||
| 18 | * @param array $response |
||
| 19 | */ |
||
| 20 | 3 | public function __construct(array $response = array()) |
|
| 21 | { |
||
| 22 | 3 | $this->response = $response; |
|
| 23 | 3 | } |
|
| 24 | /** |
||
| 25 | * Get user email |
||
| 26 | * |
||
| 27 | * @return string|null |
||
| 28 | */ |
||
| 29 | 3 | public function getEmail() |
|
| 32 | } |
||
| 33 | /** |
||
| 34 | * Get user firstname |
||
| 35 | * |
||
| 36 | * @return string|null |
||
| 37 | */ |
||
| 38 | 3 | public function getFirstname() |
|
| 39 | { |
||
| 40 | 3 | return $this->response['first_name'] ?: null; |
|
| 41 | } |
||
| 42 | /** |
||
| 43 | * Get user imageurl |
||
| 44 | * |
||
| 45 | * @return string|null |
||
| 46 | */ |
||
| 47 | 3 | public function getImageurl() |
|
| 48 | { |
||
| 49 | 3 | return $this->response['picture'] ?: null; |
|
| 50 | } |
||
| 51 | /** |
||
| 52 | * Get user lastname |
||
| 53 | * |
||
| 54 | * @return string|null |
||
| 55 | */ |
||
| 56 | 3 | public function getLastname() |
|
| 57 | { |
||
| 58 | 3 | return $this->response['last_name'] ?: null; |
|
| 59 | } |
||
| 60 | /** |
||
| 61 | * Get user userId |
||
| 62 | * |
||
| 63 | * @return string|null |
||
| 64 | */ |
||
| 65 | 3 | public function getId() |
|
| 68 | } |
||
| 69 | /** |
||
| 70 | * Return all of the owner details available as an array. |
||
| 71 | * |
||
| 72 | * @return array |
||
| 73 | */ |
||
| 74 | 3 | public function toArray() |
|
| 77 | } |
||
| 78 | } |
||
| 79 |