Total Complexity | 5 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class Image extends AbstractElement |
||
9 | { |
||
10 | /** @var string */ |
||
11 | private $filename; |
||
12 | |||
13 | /** @var Color|null */ |
||
14 | private $background; |
||
15 | |||
16 | public function __construct($x, $y, $width, $height, string $filename, Color $background = null) |
||
17 | { |
||
18 | parent::__construct($x, $y, $width, $height); |
||
19 | $this->filename = $filename; |
||
20 | $this->background = $background; |
||
21 | } |
||
22 | |||
23 | public function getFilename(): string |
||
24 | { |
||
25 | return $this->filename; |
||
26 | } |
||
27 | |||
28 | public function hasBackground(): bool |
||
29 | { |
||
30 | return (null !== $this->background); |
||
31 | } |
||
32 | |||
33 | public function getBackground(): Color |
||
39 | } |
||
40 | } |
||
41 |