Total Complexity | 9 |
Total Lines | 79 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | final class QRCode implements Command |
||
23 | { |
||
24 | use Alignable; |
||
25 | use Rotatable; |
||
26 | use PositionAware; |
||
27 | |||
28 | /** @var int|null */ |
||
29 | private $cellWidth; |
||
30 | |||
31 | /** @var string */ |
||
32 | private $data; |
||
33 | |||
34 | /** @var string|null */ |
||
35 | private $eccLevel; |
||
36 | |||
37 | /** @var int|null */ |
||
38 | private $height; |
||
|
|||
39 | |||
40 | /** @var int|null */ |
||
41 | private $magnification; |
||
42 | |||
43 | /** @var string|null */ |
||
44 | private $mode; |
||
45 | |||
46 | /** @var string|null */ |
||
47 | private $model; |
||
48 | |||
49 | public function __construct(int $x, int $y, string $data, string $eccLevel, int $cellWidth, string $mode) |
||
50 | { |
||
51 | $this->x = $x; |
||
52 | $this->y = $y; |
||
53 | $this->data = $data; |
||
54 | $this->cellWidth = $cellWidth; |
||
55 | $this->eccLevel = $eccLevel; |
||
56 | $this->mode = $mode; |
||
57 | } |
||
58 | |||
59 | public function magnify(int $value) |
||
60 | { |
||
61 | $this->magnification = $value; |
||
62 | |||
63 | return $this; |
||
64 | } |
||
65 | |||
66 | public function model(string $value) |
||
67 | { |
||
68 | $this->model = $value; |
||
69 | |||
70 | return $this; |
||
71 | } |
||
72 | |||
73 | public function getCellWidth(): ?int |
||
74 | { |
||
75 | return $this->cellWidth; |
||
76 | } |
||
77 | |||
78 | public function getData(): string |
||
79 | { |
||
80 | return $this->data; |
||
81 | } |
||
82 | |||
83 | public function getECCLevel(): string |
||
84 | { |
||
85 | return $this->eccLevel; |
||
86 | } |
||
87 | |||
88 | public function getMagnification(): ?int |
||
89 | { |
||
90 | return $this->magnification; |
||
91 | } |
||
92 | |||
93 | public function getMode(): ?string |
||
94 | { |
||
95 | return $this->mode; |
||
96 | } |
||
97 | |||
98 | public function getModel(): ?string |
||
101 | } |
||
102 | |||
103 | } |
||
104 |