Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
100.00% |
7 / 7 |
|
100.00% |
7 / 7 |
|
100.00% |
7 / 7 |
|
100.00% |
7 / 7 |
CRAP | |
100.00% |
1 / 1 |
| GenerateNickCommand | |
100.00% |
7 / 7 |
|
100.00% |
7 / 7 |
|
100.00% |
7 / 7 |
|
100.00% |
7 / 7 |
7 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getLang | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getGender | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getOffenseLevel | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getExclusions | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getPreviousNickId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getReplaceRoleType | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Dto\Command; |
| 4 | |
| 5 | use App\Enum\GrammaticalRoleType; |
| 6 | use App\Enum\Lang; |
| 7 | use App\Enum\OffenseLevel; |
| 8 | use App\Enum\WordGender; |
| 9 | |
| 10 | /** |
| 11 | * @author Wilhelm Zwertvaegher |
| 12 | */ |
| 13 | readonly class GenerateNickCommand |
| 14 | { |
| 15 | /** |
| 16 | * @param list<int> $exclusions |
| 17 | */ |
| 18 | public function __construct( |
| 19 | private Lang $lang, |
| 20 | private ?WordGender $gender = null, |
| 21 | private ?OffenseLevel $offenseLevel = null, |
| 22 | private ?int $previousNickId = null, |
| 23 | private ?GrammaticalRoleType $replaceRoleType = null, |
| 24 | private array $exclusions = [], |
| 25 | ) { |
| 26 | } |
| 27 | |
| 28 | public function getLang(): Lang |
| 29 | { |
| 30 | return $this->lang; |
| 31 | } |
| 32 | |
| 33 | public function getGender(): ?WordGender |
| 34 | { |
| 35 | return $this->gender; |
| 36 | } |
| 37 | |
| 38 | public function getOffenseLevel(): ?OffenseLevel |
| 39 | { |
| 40 | return $this->offenseLevel; |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * @return list<int> |
| 45 | */ |
| 46 | public function getExclusions(): array |
| 47 | { |
| 48 | return $this->exclusions; |
| 49 | } |
| 50 | |
| 51 | public function getPreviousNickId(): ?int |
| 52 | { |
| 53 | return $this->previousNickId; |
| 54 | } |
| 55 | |
| 56 | public function getReplaceRoleType(): ?GrammaticalRoleType |
| 57 | { |
| 58 | return $this->replaceRoleType; |
| 59 | } |
| 60 | } |