@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | |
165 | 165 | if($x <= $this->moduleCount - 7){ |
166 | 166 | if( |
167 | - $this->matrix->check($x , $y) |
|
167 | + $this->matrix->check($x , $y) |
|
168 | 168 | && !$this->matrix->check($x + 1, $y) |
169 | 169 | && $this->matrix->check($x + 2, $y) |
170 | 170 | && $this->matrix->check($x + 3, $y) |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | |
179 | 179 | if($y <= $this->moduleCount - 7){ |
180 | 180 | if( |
181 | - $this->matrix->check($x, $y) |
|
181 | + $this->matrix->check($x, $y) |
|
182 | 182 | && !$this->matrix->check($x, $y + 1) |
183 | 183 | && $this->matrix->check($x, $y + 2) |
184 | 184 | && $this->matrix->check($x, $y + 3) |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | // svg header |
70 | 70 | $svg = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'.$length.'" height="'.$length.'" viewBox="0 0 '.$length.' '.$length.'">'.$this->options->eol. |
71 | - '<defs><style>rect{shape-rendering:crispEdges}</style></defs>'.$this->options->eol; |
|
71 | + '<defs><style>rect{shape-rendering:crispEdges}</style></defs>'.$this->options->eol; |
|
72 | 72 | |
73 | 73 | // @todo: optimize -> see https://github.com/alexeyten/qr-image/blob/master/lib/vector.js |
74 | 74 | foreach($this->options->moduleValues as $key => $value){ |
@@ -94,9 +94,9 @@ discard block |
||
94 | 94 | } |
95 | 95 | elseif($from >= 0){ |
96 | 96 | $svg .= '<rect x="'.($from * $this->options->scale).'" y="'.($y * $this->options->scale) |
97 | - .'" width="'.($this->options->scale * $count).'" height="'.$this->options->scale.'" fill="'.$value.'"' |
|
98 | - .(trim($this->options->cssClass) !== '' ? ' class="'.$this->options->cssClass.'"' :'').' />' |
|
99 | - .$this->options->eol; |
|
97 | + .'" width="'.($this->options->scale * $count).'" height="'.$this->options->scale.'" fill="'.$value.'"' |
|
98 | + .(trim($this->options->cssClass) !== '' ? ' class="'.$this->options->cssClass.'"' :'').' />' |
|
99 | + .$this->options->eol; |
|
100 | 100 | |
101 | 101 | // reset count |
102 | 102 | $from = -1; |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | // close off the row, if applicable |
108 | 108 | if($from >= 0){ |
109 | 109 | $svg .= '<rect x="'.($from * $this->options->scale).'" y="'.($y * $this->options->scale) |
110 | - .'" width="'.($this->options->scale * $count).'" height="'.$this->options->scale.'" class="'.$this->options->cssClass.'" fill="'.$value.'" />'.$this->options->eol; |
|
110 | + .'" width="'.($this->options->scale * $count).'" height="'.$this->options->scale.'" class="'.$this->options->cssClass.'" fill="'.$value.'" />'.$this->options->eol; |
|
111 | 111 | } |
112 | 112 | } |
113 | 113 | } |
@@ -50,7 +50,6 @@ |
||
50 | 50 | * @see file_put_contents() |
51 | 51 | * |
52 | 52 | * @param string $data |
53 | - |
|
54 | 53 | * @return bool|int |
55 | 54 | */ |
56 | 55 | protected function saveToFile(string $data) { |