| Total Complexity | 10 |
| Total Lines | 104 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 9 | class UserLanguage implements IStringerEntity |
||
| 10 | { |
||
| 11 | protected string $id; |
||
| 12 | |||
| 13 | protected string $identifier; |
||
| 14 | |||
| 15 | protected string $name; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Page constructor. |
||
| 19 | * |
||
| 20 | * @param string $id |
||
| 21 | * @param string $identifier |
||
| 22 | * @param string $name |
||
| 23 | */ |
||
| 24 | public function __construct(string $id, string $identifier, string $name) |
||
| 25 | { |
||
| 26 | $this->id = $id; |
||
| 27 | $this->identifier = $identifier; |
||
| 28 | $this->name = $name; |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @return string |
||
| 33 | */ |
||
| 34 | public function getId() |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @param string $id |
||
| 41 | */ |
||
| 42 | public function setId($id) |
||
| 43 | { |
||
| 44 | $this->id = $id; |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @return string |
||
| 49 | */ |
||
| 50 | public function getIdentifier(): string |
||
| 51 | { |
||
| 52 | return $this->identifier; |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @param string $identifier |
||
| 57 | * |
||
| 58 | * @return $this |
||
| 59 | */ |
||
| 60 | public function setIdentifier(string $identifier): UserLanguage |
||
| 61 | { |
||
| 62 | $this->identifier = $identifier; |
||
| 63 | |||
| 64 | return $this; |
||
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @return string |
||
| 69 | */ |
||
| 70 | public function getName(): string |
||
| 71 | { |
||
| 72 | return $this->name; |
||
| 73 | } |
||
| 74 | |||
| 75 | /** |
||
| 76 | * @param string $name |
||
| 77 | * |
||
| 78 | * @return $this |
||
| 79 | */ |
||
| 80 | public function setName(string $name): UserLanguage |
||
| 81 | { |
||
| 82 | $this->name = $name; |
||
| 83 | |||
| 84 | return $this; |
||
| 85 | } |
||
| 86 | |||
| 87 | /** |
||
| 88 | * @return string |
||
| 89 | */ |
||
| 90 | public function __toString(): string |
||
| 93 | } |
||
| 94 | |||
| 95 | /** |
||
| 96 | * @return array|null |
||
| 97 | */ |
||
| 98 | public function toData(): ?array |
||
| 104 | ]; |
||
| 105 | } |
||
| 106 | |||
| 107 | /** |
||
| 108 | * @return string |
||
| 109 | */ |
||
| 110 | public function toJSON(): string |
||
| 115 |