| Total Complexity | 3 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Coverage | 75% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class Image extends File |
||
| 10 | { |
||
| 11 | protected const ALLOWED_EXTENSIONS = ['jpg', 'png', 'gif']; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Image constructor. |
||
| 15 | * |
||
| 16 | * @param string $url |
||
| 17 | * @param bool|null $reusable |
||
| 18 | * |
||
| 19 | * @throws \InvalidArgumentException |
||
| 20 | */ |
||
| 21 | 2 | public function __construct($url, ?bool $reusable = null) |
|
| 26 | 2 | } |
|
| 27 | |||
| 28 | /** |
||
| 29 | * @param string $url |
||
| 30 | * @param bool|null $reusable |
||
| 31 | * |
||
| 32 | * @throws \InvalidArgumentException |
||
| 33 | * |
||
| 34 | * @return \Kerox\Messenger\Model\Message\Attachment\File |
||
| 35 | */ |
||
| 36 | public static function create($url, ?bool $reusable = null): File |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @return array |
||
| 43 | */ |
||
| 44 | 2 | protected function getAllowedExtensions(): array |
|
| 49 |