Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| StoredFileDto | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Shared\Infrastructure\Dto; |
| 4 | |
| 5 | use App\Shared\Domain\Model\StoredFile; |
| 6 | use App\Shared\Infrastructure\Service\StoredFileDtoTransformer; |
| 7 | use App\Shared\Infrastructure\Service\StoredFileUrlTransformer; |
| 8 | use Symfony\Component\ObjectMapper\Attribute\Map; |
| 9 | |
| 10 | /** |
| 11 | * @author Wilhelm Zwertvaegher |
| 12 | */ |
| 13 | #[Map(source: StoredFile::class)] |
| 14 | class StoredFileDto |
| 15 | { |
| 16 | |
| 17 | #[Map(source: 'path', transform: StoredFileUrlTransformer::class)] |
| 18 | public string $url; |
| 19 | |
| 20 | public function __construct( |
| 21 | public string $filename, |
| 22 | public string $extension |
| 23 | ) { |
| 24 | } |
| 25 | } |