Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
100.00% |
5 / 5 |
|
100.00% |
5 / 5 |
|
100.00% |
5 / 5 |
|
100.00% |
5 / 5 |
CRAP | |
100.00% |
1 / 1 |
| GeneratedNickData | |
100.00% |
5 / 5 |
|
100.00% |
5 / 5 |
|
100.00% |
5 / 5 |
|
100.00% |
5 / 5 |
5 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getTargetGender | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getTargetOffenseLevel | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getNick | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getWords | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Dto\Result; |
| 4 | |
| 5 | use App\Entity\Nick; |
| 6 | use App\Enum\OffenseLevel; |
| 7 | use App\Enum\WordGender; |
| 8 | |
| 9 | /** |
| 10 | * @author Wilhelm Zwertvaegher |
| 11 | */ |
| 12 | readonly class GeneratedNickData |
| 13 | { |
| 14 | /** |
| 15 | * @param list<FormattedNickWord> $words |
| 16 | */ |
| 17 | public function __construct( |
| 18 | private WordGender $targetGender, |
| 19 | private OffenseLevel $targetOffenseLevel, |
| 20 | private Nick $nick, |
| 21 | private array $words, |
| 22 | ) { |
| 23 | } |
| 24 | |
| 25 | public function getTargetGender(): WordGender |
| 26 | { |
| 27 | return $this->targetGender; |
| 28 | } |
| 29 | |
| 30 | public function getTargetOffenseLevel(): OffenseLevel |
| 31 | { |
| 32 | return $this->targetOffenseLevel; |
| 33 | } |
| 34 | |
| 35 | public function getNick(): Nick |
| 36 | { |
| 37 | return $this->nick; |
| 38 | } |
| 39 | |
| 40 | /** |
| 41 | * @return list<FormattedNickWord> |
| 42 | */ |
| 43 | public function getWords(): array |
| 44 | { |
| 45 | return $this->words; |
| 46 | } |
| 47 | } |