| Total Complexity | 5 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class Line 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 getX2(): int |
||
| 33 | { |
||
| 34 | return $this->getX() + $this->getWidth(); |
||
| 35 | } |
||
| 36 | |||
| 37 | public function getY2(): int |
||
| 40 | } |
||
| 41 | |||
| 42 | public function getThickness(): int |
||
| 45 | } |
||
| 46 | |||
| 47 | public function getColor(): Color |
||
| 52 |