Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
100.00% |
8 / 8 |
|
100.00% |
8 / 8 |
|
100.00% |
8 / 8 |
|
100.00% |
8 / 8 |
CRAP | |
100.00% |
1 / 1 |
| StoredFile | |
100.00% |
8 / 8 |
|
100.00% |
8 / 8 |
|
100.00% |
8 / 8 |
|
100.00% |
8 / 8 |
8 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getPath | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getFilename | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getMimeType | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getExtension | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getType | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getCreatedAt | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Shared\Domain\Model; |
| 4 | |
| 5 | /** |
| 6 | * @author Wilhelm Zwertvaegher |
| 7 | */ |
| 8 | |
| 9 | readonly class StoredFile |
| 10 | { |
| 11 | public function __construct( |
| 12 | private EntityId $id, |
| 13 | private string $path, |
| 14 | private string $filename, |
| 15 | private string $mimeType, |
| 16 | private string $extension, |
| 17 | private string $type, |
| 18 | private \DateTimeImmutable $createdAt |
| 19 | ) { |
| 20 | } |
| 21 | |
| 22 | public function getId(): EntityId |
| 23 | { |
| 24 | return $this->id; |
| 25 | } |
| 26 | |
| 27 | public function getPath(): string |
| 28 | { |
| 29 | return $this->path; |
| 30 | } |
| 31 | |
| 32 | public function getFilename(): string |
| 33 | { |
| 34 | return $this->filename; |
| 35 | } |
| 36 | |
| 37 | public function getMimeType(): string |
| 38 | { |
| 39 | return $this->mimeType; |
| 40 | } |
| 41 | |
| 42 | public function getExtension(): string |
| 43 | { |
| 44 | return $this->extension; |
| 45 | } |
| 46 | |
| 47 | public function getType(): string |
| 48 | { |
| 49 | return $this->type; |
| 50 | } |
| 51 | |
| 52 | public function getCreatedAt(): \DateTimeImmutable |
| 53 | |
| 54 | { |
| 55 | return $this->createdAt; |
| 56 | } |
| 57 | } |
Below are the source code lines that represent each code branch as identified by Xdebug. Please note a branch is not
necessarily coterminous with a line, a line may contain multiple branches and therefore show up more than once.
Please also be aware that some branches may be implicit rather than explicit, e.g. an if statement
always has an else as part of its logical flow even if you didn't write one.
| 11 | public function __construct( |
| 12 | private EntityId $id, |
| 13 | private string $path, |
| 14 | private string $filename, |
| 15 | private string $mimeType, |
| 16 | private string $extension, |
| 17 | private string $type, |
| 18 | private \DateTimeImmutable $createdAt |
| 19 | ) { |
| 20 | } |
| 55 | return $this->createdAt; |
| 56 | } |
| 44 | return $this->extension; |
| 45 | } |
| 34 | return $this->filename; |
| 35 | } |
| 24 | return $this->id; |
| 25 | } |
| 39 | return $this->mimeType; |
| 40 | } |
| 29 | return $this->path; |
| 30 | } |
| 49 | return $this->type; |
| 50 | } |