@@ -43,11 +43,9 @@ |
||
43 | 43 | |
44 | 44 | if(0x8140 <= $c && $c <= 0x9FFC){ |
45 | 45 | $c -= 0x8140; |
46 | - } |
|
47 | - else if(0xE040 <= $c && $c <= 0xEBBF){ |
|
46 | + } else if(0xE040 <= $c && $c <= 0xEBBF){ |
|
48 | 47 | $c -= 0xC140; |
49 | - } |
|
50 | - else{ |
|
48 | + } else{ |
|
51 | 49 | throw new QRCodeDataException('illegal char at '.($i + 1).' ('.$c.')'); |
52 | 50 | } |
53 | 51 |
@@ -45,8 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | if($this->dataLength - $i === 1){ |
47 | 47 | $buffer->put($this->parseInt(substr($this->data, $i, $i + 1)), 4); |
48 | - } |
|
49 | - elseif($this->dataLength - $i === 2){ |
|
48 | + } elseif($this->dataLength - $i === 2){ |
|
50 | 49 | $buffer->put($this->parseInt(substr($this->data, $i, $i + 2)), 7); |
51 | 50 | } |
52 | 51 | |
@@ -70,8 +69,7 @@ discard block |
||
70 | 69 | |
71 | 70 | if($ord0 <= $c && $c <= ord('9')){ |
72 | 71 | $c = $c - $ord0; |
73 | - } |
|
74 | - else{ |
|
72 | + } else{ |
|
75 | 73 | throw new QRCodeDataException('illegal char: '.$c); |
76 | 74 | } |
77 | 75 |
@@ -142,8 +142,7 @@ |
||
142 | 142 | |
143 | 143 | if($n < 0){ |
144 | 144 | $n += 255; |
145 | - } |
|
146 | - elseif($n >= 256){ |
|
145 | + } elseif($n >= 256){ |
|
147 | 146 | $n -= 255; |
148 | 147 | } |
149 | 148 |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | for($row = 0; $row < $this->pixelCount; $row++){ |
253 | 253 | for($col = 0; $col < $this->pixelCount - 6; $col++){ |
254 | 254 | if( |
255 | - $this->matrix[$row][$col ] |
|
255 | + $this->matrix[$row][$col ] |
|
256 | 256 | && !$this->matrix[$row][$col + 1] |
257 | 257 | && $this->matrix[$row][$col + 2] |
258 | 258 | && $this->matrix[$row][$col + 3] |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | for($col = 0; $col < $this->pixelCount; $col++){ |
269 | 269 | for($row = 0; $row < $this->pixelCount - 6; $row++){ |
270 | 270 | if( |
271 | - $this->matrix[$row ][$col] |
|
271 | + $this->matrix[$row ][$col] |
|
272 | 272 | && !$this->matrix[$row + 1][$col] |
273 | 273 | && $this->matrix[$row + 2][$col] |
274 | 274 | && $this->matrix[$row + 3][$col] |