Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
33.33% |
1 / 3 |
|
33.33% |
1 / 3 |
CRAP | |
0.00% |
0 / 1 |
| ImageFile | |
33.33% |
1 / 3 |
|
33.33% |
1 / 3 |
5.67 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getFile | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | namespace Apie\Fixtures\Entities; |
| 3 | |
| 4 | use Apie\Core\Attributes\RemovalCheck; |
| 5 | use Apie\Core\Attributes\SearchFilterOption; |
| 6 | use Apie\Core\Attributes\StaticCheck; |
| 7 | use Apie\Core\Entities\EntityInterface; |
| 8 | use Apie\Fixtures\Identifiers\ImageFileIdentifier; |
| 9 | use Psr\Http\Message\UploadedFileInterface; |
| 10 | |
| 11 | #[RemovalCheck(new StaticCheck())] |
| 12 | final class ImageFile implements EntityInterface |
| 13 | { |
| 14 | public function __construct( |
| 15 | private ImageFileIdentifier $id, |
| 16 | private UploadedFileInterface $file, |
| 17 | public ?string $alternativeText |
| 18 | ) { |
| 19 | } |
| 20 | |
| 21 | public function getId(): ImageFileIdentifier |
| 22 | { |
| 23 | return $this->id; |
| 24 | } |
| 25 | |
| 26 | #[SearchFilterOption(enabled: false)] |
| 27 | public function getFile(): UploadedFileInterface |
| 28 | { |
| 29 | return $this->file; |
| 30 | } |
| 31 | } |