| Total Complexity | 11 |
| Total Lines | 74 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class UserParam extends BaseParam |
||
| 8 | { |
||
| 9 | protected string $username = ''; |
||
| 10 | protected string $lastname = ''; |
||
| 11 | protected string $firstname = ''; |
||
| 12 | protected string $password = ''; |
||
| 13 | protected string $age = ''; |
||
| 14 | |||
| 15 | public function fromEntity(Entity $entity): BaseParam |
||
| 16 | { |
||
| 17 | $this->username = $entity->username; |
||
| 18 | $this->lastname = $entity->lname; |
||
| 19 | $this->firstname = $entity->fname; |
||
| 20 | $this->password = $entity->password; |
||
| 21 | $this->age = $entity->age; |
||
| 22 | |||
| 23 | return $this; |
||
| 24 | } |
||
| 25 | |||
| 26 | public function getUsername(): string |
||
| 27 | { |
||
| 28 | return $this->username; |
||
| 29 | } |
||
| 30 | |||
| 31 | public function setUsername(string $username): self |
||
| 32 | { |
||
| 33 | $this->username = $username; |
||
| 34 | |||
| 35 | return $this; |
||
| 36 | } |
||
| 37 | |||
| 38 | public function getPassword(): string |
||
| 39 | { |
||
| 40 | return $this->password; |
||
| 41 | } |
||
| 42 | |||
| 43 | public function setPassword(string $password): self |
||
| 48 | } |
||
| 49 | |||
| 50 | public function getLastname(): string |
||
| 53 | } |
||
| 54 | |||
| 55 | public function getFirstname(): string |
||
| 58 | } |
||
| 59 | |||
| 60 | public function getAge(): string |
||
| 61 | { |
||
| 62 | return $this->age; |
||
| 63 | } |
||
| 64 | |||
| 65 | public function setLastname(string $lastname): self |
||
| 66 | { |
||
| 67 | $this->lastname = $lastname; |
||
| 68 | return $this; |
||
| 69 | } |
||
| 70 | |||
| 71 | public function setFirstname(string $firstname): self |
||
| 75 | } |
||
| 76 | |||
| 77 | public function setAge(string $age): self |
||
| 78 | { |
||
| 79 | $this->age = $age; |
||
| 80 | return $this; |
||
| 83 |