PlayerAssembler   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 9
ccs 6
cts 6
cp 1
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A toPlayerDto() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Game\Infrastructure\Repository\Doctrine;
6
7
use App\Game\Features\Authorization\PlayerDto;
8
use App\Game\Features\Player\Player\Player;
9
10
final class PlayerAssembler
11
{
12 1
    public function toPlayerDto(Player $player): PlayerDto
13
    {
14 1
        return new PlayerDto(
15 1
            $player->playerId()->id(),
16 1
            $player->nickname(),
17 1
            $player->level(),
18 1
            $player->role()->getValue()
19
        );
20
    }
21
}
22