Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
100.00% |
10 / 10 |
|
100.00% |
10 / 10 |
|
100.00% |
10 / 10 |
|
100.00% |
10 / 10 |
CRAP | |
100.00% |
1 / 1 |
| MaintainWordProperties | |
100.00% |
10 / 10 |
|
100.00% |
10 / 10 |
|
100.00% |
10 / 10 |
|
100.00% |
10 / 10 |
10 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getWordId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getLabel | |
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 | |||
| getLang | |
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 | |||
| getStatus | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| isAsSubject | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| isAsQualifier | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getQualifierPosition | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Dto\Properties; |
| 4 | |
| 5 | use App\Enum\Lang; |
| 6 | use App\Enum\OffenseLevel; |
| 7 | use App\Enum\QualifierPosition; |
| 8 | use App\Enum\WordGender; |
| 9 | use App\Enum\WordStatus; |
| 10 | |
| 11 | /** |
| 12 | * DTO used to pass properties to a service to maintain a Word. |
| 13 | * |
| 14 | * @author Wilhelm Zwertvaegher |
| 15 | */ |
| 16 | readonly class MaintainWordProperties |
| 17 | { |
| 18 | public function __construct( |
| 19 | private string $label, |
| 20 | private WordGender $gender, |
| 21 | private Lang $lang, |
| 22 | private OffenseLevel $offenseLevel, |
| 23 | private WordStatus $status, |
| 24 | private bool $asSubject = false, |
| 25 | private bool $asQualifier = false, |
| 26 | private ?QualifierPosition $qualifierPosition = null, |
| 27 | private ?int $wordId = null, |
| 28 | ) { |
| 29 | } |
| 30 | |
| 31 | public function getWordId(): ?int |
| 32 | { |
| 33 | return $this->wordId; |
| 34 | } |
| 35 | |
| 36 | public function getLabel(): string |
| 37 | { |
| 38 | return $this->label; |
| 39 | } |
| 40 | |
| 41 | public function getGender(): WordGender |
| 42 | { |
| 43 | return $this->gender; |
| 44 | } |
| 45 | |
| 46 | public function getLang(): Lang |
| 47 | { |
| 48 | return $this->lang; |
| 49 | } |
| 50 | |
| 51 | public function getOffenseLevel(): OffenseLevel |
| 52 | { |
| 53 | return $this->offenseLevel; |
| 54 | } |
| 55 | |
| 56 | public function getStatus(): WordStatus |
| 57 | { |
| 58 | return $this->status; |
| 59 | } |
| 60 | |
| 61 | public function isAsSubject(): bool |
| 62 | { |
| 63 | return $this->asSubject; |
| 64 | } |
| 65 | |
| 66 | public function isAsQualifier(): bool |
| 67 | { |
| 68 | return $this->asQualifier; |
| 69 | } |
| 70 | |
| 71 | public function getQualifierPosition(): ?QualifierPosition |
| 72 | { |
| 73 | return $this->qualifierPosition; |
| 74 | } |
| 75 | } |
Below are the source code lines that represent each code path as identified by Xdebug. Please note a path is not
necessarily coterminous with a line, a line may contain multiple paths and therefore show up more than once.
Please also be aware that some paths may include implicit rather than explicit branches, e.g. an if statement
always has an else as part of its logical flow even if you didn't write one.
| 18 | public function __construct( |
| 19 | private string $label, |
| 20 | private WordGender $gender, |
| 21 | private Lang $lang, |
| 22 | private OffenseLevel $offenseLevel, |
| 23 | private WordStatus $status, |
| 24 | private bool $asSubject = false, |
| 25 | private bool $asQualifier = false, |
| 26 | private ?QualifierPosition $qualifierPosition = null, |
| 27 | private ?int $wordId = null, |
| 28 | ) { |
| 29 | } |
| 43 | return $this->gender; |
| 44 | } |
| 38 | return $this->label; |
| 39 | } |
| 48 | return $this->lang; |
| 49 | } |
| 53 | return $this->offenseLevel; |
| 54 | } |
| 73 | return $this->qualifierPosition; |
| 74 | } |
| 58 | return $this->status; |
| 59 | } |
| 33 | return $this->wordId; |
| 34 | } |
| 68 | return $this->asQualifier; |
| 69 | } |
| 63 | return $this->asSubject; |
| 64 | } |
| 3 | namespace App\Dto\Properties; |
| 4 | |
| 5 | use App\Enum\Lang; |
| 6 | use App\Enum\OffenseLevel; |
| 7 | use App\Enum\QualifierPosition; |
| 8 | use App\Enum\WordGender; |
| 9 | use App\Enum\WordStatus; |
| 10 | |
| 11 | /** |
| 12 | * DTO used to pass properties to a service to maintain a Word. |
| 13 | * |
| 14 | * @author Wilhelm Zwertvaegher |
| 15 | */ |
| 16 | readonly class MaintainWordProperties |
| 17 | { |
| 18 | public function __construct( |
| 19 | private string $label, |
| 20 | private WordGender $gender, |
| 21 | private Lang $lang, |
| 22 | private OffenseLevel $offenseLevel, |
| 23 | private WordStatus $status, |
| 24 | private bool $asSubject = false, |
| 25 | private bool $asQualifier = false, |
| 26 | private ?QualifierPosition $qualifierPosition = null, |
| 27 | private ?int $wordId = null, |
| 28 | ) { |
| 29 | } |
| 30 | |
| 31 | public function getWordId(): ?int |
| 32 | { |
| 33 | return $this->wordId; |
| 34 | } |
| 35 | |
| 36 | public function getLabel(): string |
| 37 | { |
| 38 | return $this->label; |
| 39 | } |
| 40 | |
| 41 | public function getGender(): WordGender |
| 42 | { |
| 43 | return $this->gender; |
| 44 | } |
| 45 | |
| 46 | public function getLang(): Lang |
| 47 | { |
| 48 | return $this->lang; |
| 49 | } |
| 50 | |
| 51 | public function getOffenseLevel(): OffenseLevel |
| 52 | { |
| 53 | return $this->offenseLevel; |
| 54 | } |
| 55 | |
| 56 | public function getStatus(): WordStatus |
| 57 | { |
| 58 | return $this->status; |
| 59 | } |
| 60 | |
| 61 | public function isAsSubject(): bool |
| 62 | { |
| 63 | return $this->asSubject; |
| 64 | } |
| 65 | |
| 66 | public function isAsQualifier(): bool |
| 67 | { |
| 68 | return $this->asQualifier; |
| 69 | } |
| 70 | |
| 71 | public function getQualifierPosition(): ?QualifierPosition |
| 72 | { |
| 73 | return $this->qualifierPosition; |
| 74 | } |