| Total Complexity | 6 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | final class PlayerDto implements JsonSerializable |
||
| 13 | { |
||
| 14 | private Role $role; |
||
| 15 | private PlayerId $playerId; |
||
| 16 | private int $level; |
||
| 17 | private string $nickname; |
||
| 18 | |||
| 19 | public function __construct(PlayerId $playerId, string $nickname, int $level, Role $role) |
||
| 20 | { |
||
| 21 | $this->playerId = $playerId; |
||
| 22 | $this->role = $role; |
||
| 23 | $this->level = $level; |
||
| 24 | $this->nickname = $nickname; |
||
| 25 | } |
||
| 26 | |||
| 27 | public function playerId(): PlayerId |
||
| 28 | { |
||
| 29 | return $this->playerId; |
||
| 30 | } |
||
| 31 | |||
| 32 | public function level(): int |
||
| 35 | } |
||
| 36 | |||
| 37 | public function role(): Role |
||
| 40 | } |
||
| 41 | |||
| 42 | public function nickname(): string |
||
| 45 | } |
||
| 46 | |||
| 47 | public function jsonSerialize(): array |
||
| 57 |