Total Complexity | 5 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
7 | class ImageValidator implements UploadFileValidator |
||
8 | { |
||
9 | /** @var int */ |
||
10 | private $maxFileSize; |
||
11 | |||
12 | /** @var string[] */ |
||
13 | private $supportedMimeTypes; |
||
14 | |||
15 | /** |
||
16 | * @param int $maxFileSize in bytes |
||
17 | * @param string[] $supportedMimeTypes |
||
18 | */ |
||
19 | public function __construct(int $maxFileSize, array $supportedMimeTypes) |
||
20 | { |
||
21 | $this->maxFileSize = $maxFileSize; |
||
22 | $this->supportedMimeTypes = $supportedMimeTypes; |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * @inheritdoc |
||
27 | */ |
||
28 | public function validate(UploadedFile $uploadedFile): void |
||
45 | } |
||
46 | } |
||
48 |