Total Complexity | 3 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
13 | trait FileTrait |
||
14 | { |
||
15 | /** |
||
16 | * We are not asserting this is a file here because it may be a string for dynamic component e.g. {{ filePath }} |
||
17 | * validation constraint could be made perhaps to validate a file or a variable |
||
18 | * @ORM\Column(type="string", nullable=false) |
||
19 | * @Groups({"component", "content", "route"}) |
||
20 | * @ApiProperty(iri="http://schema.org/contentUrl") |
||
21 | * @var null|string |
||
22 | */ |
||
23 | protected $filePath; |
||
24 | |||
25 | /** |
||
26 | * @return null|string |
||
27 | */ |
||
28 | 6 | public function getFilePath(): ?string |
|
31 | } |
||
32 | |||
33 | /** |
||
34 | * @param null|string $filePath |
||
35 | */ |
||
36 | 4 | public function setFilePath(?string $filePath): void |
|
37 | { |
||
38 | 4 | $this->filePath = $filePath; |
|
39 | 4 | } |
|
40 | |||
41 | 1 | public static function getImagineFilters(): array |
|
46 | ]; |
||
47 | } |
||
49 |