| Total Complexity | 5 |
| Total Lines | 65 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class Man |
||
| 9 | { |
||
| 10 | /** @var string name */ |
||
| 11 | private $name; |
||
| 12 | /** @var string second name */ |
||
| 13 | private $surname; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Man constructor. |
||
| 17 | * |
||
| 18 | * @param string $name name |
||
| 19 | * @param string $surname second name |
||
| 20 | */ |
||
| 21 | public function __construct(string $name, string $surname) |
||
| 22 | { |
||
| 23 | $this->name = $name; |
||
| 24 | $this->surname = $surname; |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Getter for name. |
||
| 29 | * |
||
| 30 | * @see Man::$name |
||
| 31 | * |
||
| 32 | * @return string name |
||
| 33 | */ |
||
| 34 | public function getName(): string |
||
| 35 | { |
||
| 36 | return $this->name; |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Getter for second name. |
||
| 41 | * |
||
| 42 | * @see Man::$surname |
||
| 43 | * |
||
| 44 | * @return string surname |
||
| 45 | */ |
||
| 46 | public function getSurname(): string |
||
| 47 | { |
||
| 48 | return $this->surname; |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Setter for first name. |
||
| 53 | * |
||
| 54 | * @see Man::$surname |
||
| 55 | * |
||
| 56 | * @param string $name first name |
||
| 57 | */ |
||
| 58 | public function setName(string $name): void |
||
| 59 | { |
||
| 60 | $this->name = $name; |
||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * Setter for second name. |
||
| 65 | * |
||
| 66 | * @see Man::$surname |
||
| 67 | * |
||
| 68 | * @param string $surname second name |
||
| 69 | */ |
||
| 70 | public function setSurname(string $surname): void |
||
| 71 | { |
||
| 72 | $this->surname = $surname; |
||
| 73 | } |
||
| 74 | } |