Total Complexity | 3 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class Rectangle extends AbstractElement |
||
9 | { |
||
10 | /** @var int border weight */ |
||
11 | private $thickness; |
||
12 | |||
13 | /** @var Color */ |
||
14 | private $color; |
||
15 | |||
16 | /** |
||
17 | * Rectangle constructor. |
||
18 | * @param int $x |
||
19 | * @param int $y |
||
20 | * @param int $width |
||
21 | * @param int $height |
||
22 | * @param Color $color |
||
23 | * @param int $thickness |
||
24 | */ |
||
25 | public function __construct(int $x, int $y, int $width, int $height, Color $color, $thickness = 1) |
||
26 | { |
||
27 | parent::__construct($x, $y, $width, $height); |
||
28 | $this->thickness = $thickness; |
||
29 | $this->color = $color; |
||
30 | } |
||
31 | |||
32 | public function getThickness(): int |
||
33 | { |
||
34 | return $this->thickness; |
||
35 | } |
||
36 | |||
37 | public function getColor(): Color |
||
40 | } |
||
41 | } |
||
42 |