@@ -143,7 +143,8 @@ |
||
| 143 | 143 | // This is a direct application of Chien's search |
| 144 | 144 | $numErrors = $errorLocator->getDegree(); |
| 145 | 145 | |
| 146 | - if($numErrors === 1){ // shortcut |
|
| 146 | + if($numErrors === 1){ |
|
| 147 | +// shortcut |
|
| 147 | 148 | return [$errorLocator->getCoefficient(1)]; |
| 148 | 149 | } |
| 149 | 150 | |
@@ -88,7 +88,8 @@ |
||
| 88 | 88 | |
| 89 | 89 | if($this->bitMatrix->get($j, $i)){ |
| 90 | 90 | // Black pixel |
| 91 | - if($currentState === 1){ // Counting black pixels |
|
| 91 | + if($currentState === 1){ |
|
| 92 | +// Counting black pixels |
|
| 92 | 93 | $stateCount[$currentState]++; |
| 93 | 94 | } |
| 94 | 95 | // Counting white pixels |
@@ -59,7 +59,8 @@ |
||
| 59 | 59 | $estAlignmentY = (int)($topLeft->getY() + $correctionToTopLeft * ($bottomRightY - $topLeft->getY())); |
| 60 | 60 | |
| 61 | 61 | // Kind of arbitrary -- expand search radius before giving up |
| 62 | - for($i = 4; $i <= 16; $i <<= 1){//?????????? |
|
| 62 | + for($i = 4; $i <= 16; $i <<= 1){ |
|
| 63 | +//?????????? |
|
| 63 | 64 | $alignmentPattern = $this->findAlignmentInRegion($moduleSize, $estAlignmentX, $estAlignmentY, (float)$i); |
| 64 | 65 | |
| 65 | 66 | if($alignmentPattern !== null){ |
@@ -153,7 +153,8 @@ |
||
| 153 | 153 | } |
| 154 | 154 | } |
| 155 | 155 | // @codeCoverageIgnoreStart |
| 156 | - catch(Throwable $aioobe){//ArrayIndexOutOfBoundsException |
|
| 156 | + catch(Throwable $aioobe){ |
|
| 157 | +//ArrayIndexOutOfBoundsException |
|
| 157 | 158 | // This feels wrong, but, sometimes if the finder patterns are misidentified, the resulting |
| 158 | 159 | // transform gets "twisted" such that it maps a straight line of points to a set of points |
| 159 | 160 | // whose endpoints are in bounds, but others are not. There is probably some mathematical |