mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-30 20:17:17 +00:00
:octocat: this was possible all the time???
This commit is contained in:
@@ -93,9 +93,8 @@ class QRSvgWithLogoAndCustomShapes extends QRMarkupSVG{
|
||||
'q0,1 1,1 h3 q1,0 1,-1 v-3 q0,-1 -1,-1z m0,2.5 a1.5,1.5 0 1 0 3,0 a1.5,1.5 0 1 0 -3,0Z';
|
||||
$finder = [];
|
||||
|
||||
foreach($pos as $coord){
|
||||
[$ix, $iy] = $coord;
|
||||
$finder[] = sprintf($path, $ix, $iy);
|
||||
foreach($pos as [$ix, $iy]){
|
||||
$finder[] = sprintf($path, $ix, $iy);
|
||||
}
|
||||
|
||||
return implode(' ', $finder);
|
||||
|
||||
@@ -52,9 +52,7 @@ final class ReedSolomonDecoder{
|
||||
$dataBlocks = $this->deinterleaveRawBytes($rawCodewords);
|
||||
$dataBytes = [];
|
||||
|
||||
foreach($dataBlocks as $dataBlock){
|
||||
[$numDataCodewords, $codewordBytes] = $dataBlock;
|
||||
|
||||
foreach($dataBlocks as [$numDataCodewords, $codewordBytes]){
|
||||
$corrected = $this->correctErrors($codewordBytes, $numDataCodewords);
|
||||
|
||||
for($i = 0; $i < $numDataCodewords; $i++){
|
||||
@@ -81,9 +79,7 @@ final class ReedSolomonDecoder{
|
||||
$result = [];//new DataBlock[$totalBlocks];
|
||||
$numResultBlocks = 0;
|
||||
|
||||
foreach($eccBlocks as $blockData){
|
||||
[$numEccBlocks, $eccPerBlock] = $blockData;
|
||||
|
||||
foreach($eccBlocks as [$numEccBlocks, $eccPerBlock]){
|
||||
for($i = 0; $i < $numEccBlocks; $i++, $numResultBlocks++){
|
||||
$result[$numResultBlocks] = [$eccPerBlock, array_fill(0, ($numEccCodewords + $eccPerBlock), 0)];
|
||||
}
|
||||
|
||||
@@ -54,9 +54,7 @@ final class ReedSolomonEncoder{
|
||||
$maxEcBytes = 0;
|
||||
$dataByteOffset = 0;
|
||||
|
||||
foreach($rsBlocks as $key => $block){
|
||||
[$rsBlockTotal, $dataByteCount] = $block;
|
||||
|
||||
foreach($rsBlocks as $key => [$rsBlockTotal, $dataByteCount]){
|
||||
$dataBytes[$key] = [];
|
||||
|
||||
for($i = 0; $i < $dataByteCount; $i++){
|
||||
|
||||
@@ -339,9 +339,7 @@ class QRMatrix{
|
||||
public function checkNeighbours(int $x, int $y, int $M_TYPE = null):int{
|
||||
$bits = 0;
|
||||
|
||||
foreach($this::neighbours as $bit => $coord){
|
||||
[$ix, $iy] = $coord;
|
||||
|
||||
foreach($this::neighbours as $bit => [$ix, $iy]){
|
||||
$ix += $x;
|
||||
$iy += $y;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user