Total Complexity | 6 |
Total Lines | 64 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | final class InternalImage implements Command |
||
28 | { |
||
29 | use Rotatable; |
||
30 | use Invertible; |
||
31 | use Magnifiable; |
||
32 | use PositionAware; |
||
33 | |||
34 | /** @var TsplBpp */ |
||
35 | private $bpp; |
||
36 | |||
37 | /** @var int */ |
||
38 | private $contrast; |
||
39 | |||
40 | /** @var string */ |
||
41 | private $name; |
||
42 | |||
43 | public function __construct(int $x, int $y, string $name) |
||
44 | { |
||
45 | $this->x = $x; |
||
46 | $this->y = $y; |
||
47 | $this->name = $name; |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * (TSPL) Bits per pixel. |
||
52 | * |
||
53 | * @param TsplBpp $bpp |
||
54 | * |
||
55 | * @return $this |
||
56 | */ |
||
57 | public function bpp(TsplBpp $bpp) |
||
58 | { |
||
59 | $this->bpp = $bpp; |
||
60 | |||
61 | return $this; |
||
62 | } |
||
63 | |||
64 | /** |
||
65 | * (TSPL) Contrast of grayscale graphic. |
||
66 | * |
||
67 | * @param int $value |
||
68 | * |
||
69 | * @return $this |
||
70 | */ |
||
71 | public function contrast(int $value) |
||
72 | { |
||
73 | $this->contrast = $value; |
||
74 | |||
75 | return $this; |
||
76 | } |
||
77 | |||
78 | public function getBpp(): ?TsplBpp |
||
79 | { |
||
80 | return $this->bpp; |
||
81 | } |
||
82 | |||
83 | public function getContrast(): ?int |
||
84 | { |
||
85 | return $this->contrast; |
||
86 | } |
||
87 | |||
88 | public function getName(): string |
||
91 | } |
||
92 | } |
||
93 |