| Total Complexity | 12 |
| Total Lines | 163 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | abstract class UserAbstract implements UserInterface |
||
| 6 | { |
||
| 7 | |||
| 8 | use UserIdAwareTrait; |
||
| 9 | |||
| 10 | public $display_name; |
||
| 11 | public $first_name; |
||
| 12 | public $last_name; |
||
| 13 | public $login_name; |
||
| 14 | public $email; |
||
| 15 | public $api_key; |
||
| 16 | |||
| 17 | |||
| 18 | /** |
||
| 19 | * Returns the user's full name |
||
| 20 | */ |
||
| 21 | abstract public function getFullName(); |
||
| 22 | |||
| 23 | |||
| 24 | |||
| 25 | 2 | ||
| 26 | /** |
||
| 27 | 2 | * @uses $display_name |
|
| 28 | 2 | */ |
|
| 29 | public function setDisplayName($display_name) |
||
| 30 | { |
||
| 31 | $this->display_name = $display_name; |
||
| 32 | return $this; |
||
| 33 | } |
||
| 34 | |||
| 35 | |||
| 36 | |||
| 37 | 2 | /** |
|
| 38 | * @return string |
||
| 39 | 2 | * @uses $display_name |
|
| 40 | */ |
||
| 41 | public function getDisplayName() |
||
| 42 | { |
||
| 43 | return $this->display_name; |
||
| 44 | } |
||
| 45 | |||
| 46 | |||
| 47 | |||
| 48 | |||
| 49 | |||
| 50 | |||
| 51 | |||
| 52 | |||
| 53 | |||
| 54 | /** |
||
| 55 | * @param string $name |
||
| 56 | * @return self |
||
| 57 | 8 | * @uses $first_name |
|
| 58 | */ |
||
| 59 | 8 | public function setFirstName($name) |
|
| 60 | 8 | { |
|
| 61 | $this->first_name = $name; |
||
| 62 | return $this; |
||
| 63 | } |
||
| 64 | |||
| 65 | |||
| 66 | /** |
||
| 67 | * @uses $first_name |
||
| 68 | */ |
||
| 69 | 8 | public function getFirstName() |
|
| 70 | { |
||
| 71 | 8 | return $this->first_name; |
|
| 72 | } |
||
| 73 | |||
| 74 | |||
| 75 | |||
| 76 | |||
| 77 | /** |
||
| 78 | * @param string $name |
||
| 79 | * @return self |
||
| 80 | * @uses $last_name |
||
| 81 | */ |
||
| 82 | public function setLastName($name) |
||
| 83 | { |
||
| 84 | $this->last_name = $name; |
||
| 85 | return $this; |
||
| 86 | } |
||
| 87 | 2 | ||
| 88 | |||
| 89 | 2 | /** |
|
| 90 | 2 | * @uses $last_name |
|
| 91 | */ |
||
| 92 | public function getLastName() |
||
| 93 | { |
||
| 94 | return $this->last_name; |
||
| 95 | } |
||
| 96 | |||
| 97 | 2 | ||
| 98 | |||
| 99 | 2 | ||
| 100 | /** |
||
| 101 | * @param string $name |
||
| 102 | * @return self |
||
| 103 | * @uses $login_name |
||
| 104 | */ |
||
| 105 | public function setLoginName($name) |
||
| 106 | { |
||
| 107 | $this->login_name = $name; |
||
| 108 | return $this; |
||
| 109 | } |
||
| 110 | 2 | ||
| 111 | |||
| 112 | 2 | /** |
|
| 113 | 2 | * @uses $login_name |
|
| 114 | */ |
||
| 115 | public function getLoginName() |
||
| 116 | { |
||
| 117 | return $this->login_name; |
||
| 118 | } |
||
| 119 | |||
| 120 | 2 | ||
| 121 | |||
| 122 | 2 | ||
| 123 | |||
| 124 | /** |
||
| 125 | * @param mixed $email |
||
| 126 | * @return self |
||
| 127 | */ |
||
| 128 | public function setEmail( $email) |
||
| 129 | { |
||
| 130 | $this->email = $email; |
||
| 131 | return $this; |
||
| 132 | } |
||
| 133 | 8 | ||
| 134 | |||
| 135 | 8 | /** |
|
| 136 | 8 | * @uses $email |
|
| 137 | */ |
||
| 138 | public function getEmail() |
||
| 139 | { |
||
| 140 | return $this->email; |
||
| 141 | } |
||
| 142 | |||
| 143 | 4 | ||
| 144 | |||
| 145 | 4 | /** |
|
| 146 | * Returns the users API key (if defined) |
||
| 147 | * |
||
| 148 | * @return string|null |
||
| 149 | * @uses $api_key |
||
| 150 | */ |
||
| 151 | public function getApiKey() |
||
| 152 | { |
||
| 153 | return $this->api_key; |
||
| 154 | } |
||
| 155 | |||
| 156 | 2 | ||
| 157 | |||
| 158 | 2 | /** |
|
| 159 | 2 | * Sets the users API key |
|
| 160 | * |
||
| 161 | * @return self |
||
| 162 | * @uses $api_key |
||
| 163 | */ |
||
| 164 | public function setApiKey( $key ) |
||
| 168 | 2 | } |
|
| 169 | |||
| 170 | |||
| 171 | |||
| 172 | } |
||
| 173 |