@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | { |
20 | 20 | parent::__construct($options, $matrix); |
21 | 21 | |
22 | - if (!\class_exists(\FPDF::class)) { |
|
22 | + if(!\class_exists(\FPDF::class)){ |
|
23 | 23 | throw new \BadMethodCallException( |
24 | 24 | 'The QRFpdf output requires FPDF as dependency but the class "\FPDF" couldn\'t be found.' |
25 | 25 | ); |
@@ -31,14 +31,14 @@ discard block |
||
31 | 31 | */ |
32 | 32 | protected function setModuleValues(): void |
33 | 33 | { |
34 | - foreach ($this::DEFAULT_MODULE_VALUES as $M_TYPE => $defaultValue) { |
|
34 | + foreach($this::DEFAULT_MODULE_VALUES as $M_TYPE => $defaultValue){ |
|
35 | 35 | $v = $this->options->moduleValues[$M_TYPE] ?? null; |
36 | 36 | |
37 | - if (!\is_array($v) || \count($v) < 3) { |
|
37 | + if(!\is_array($v) || \count($v) < 3){ |
|
38 | 38 | $this->moduleValues[$M_TYPE] = $defaultValue |
39 | 39 | ? [0, 0, 0] |
40 | 40 | : [255, 255, 255]; |
41 | - } else { |
|
41 | + } else{ |
|
42 | 42 | $this->moduleValues[$M_TYPE] = \array_values($v); |
43 | 43 | } |
44 | 44 | } |
@@ -55,13 +55,13 @@ discard block |
||
55 | 55 | $fpdf->AddPage(); |
56 | 56 | |
57 | 57 | $prevColor = null; |
58 | - foreach ($this->matrix->matrix() as $y => $row) { |
|
59 | - foreach ($row as $x => $M_TYPE) { |
|
58 | + foreach($this->matrix->matrix() as $y => $row){ |
|
59 | + foreach($row as $x => $M_TYPE){ |
|
60 | 60 | /** |
61 | 61 | * @var int $M_TYPE |
62 | 62 | */ |
63 | 63 | $color = $this->moduleValues[$M_TYPE]; |
64 | - if ($prevColor === null || $prevColor !== $color) { |
|
64 | + if($prevColor === null || $prevColor !== $color){ |
|
65 | 65 | $fpdf->SetFillColor(...$color); |
66 | 66 | $prevColor = $color; |
67 | 67 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | $pdfData = $fpdf->Output('S'); |
73 | 73 | |
74 | - if ($file !== null) { |
|
74 | + if($file !== null){ |
|
75 | 75 | $this->saveToFile($pdfData, $file); |
76 | 76 | } |
77 | 77 |