Completed
Branch develop (a0a623)
by Romain
02:33
created

Image::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
namespace Kerox\Messenger\Message\Attachment;
3
4
use Kerox\Messenger\Message\Attachment;
5
6
class Image extends File
7
{
8
9
    /**
10
     * @var array
11
     */
12
    protected $allowedExtension = ['jpg', 'png', 'gif'];
13
14
    /**
15
     * Image constructor.
16
     *
17
     * @param string $url
18
     * @param bool|null $reusable
19
     */
20
    public function __construct(string $url, bool $reusable = null)
21
    {
22
        $this->isValidExtension($url, $this->allowedExtension);
23
24
        parent::__construct($url, $reusable, Attachment::TYPE_IMAGE);
25
    }
26
}