Skip to content

Commit 2f6d079

Browse files
committed
:octocat: cleanup
1 parent 0044e68 commit 2f6d079

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/Data/QRDataInterface.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ interface QRDataInterface{
2020
/**
2121
* @link http://www.qrcode.com/en/about/version.html
2222
*/
23-
const MAX_LENGTH =[ 1 => // start at 1
24-
// [NUMERIC => [L, M, Q, H ], ALPHANUM => [L, M, Q, H], BINARY => [L, M, Q, H ], KANJI => [L, M, Q, H ]] // modules
23+
const MAX_LENGTH =[ null, // start at 1
24+
// [NUMERIC => [L, M, Q, H ], ALPHANUM => [L, M, Q, H], BINARY => [L, M, Q, H ], KANJI => [L, M, Q, H ]] // modules
2525
[[ 41, 34, 27, 17], [ 25, 20, 16, 10], [ 17, 14, 11, 7], [ 10, 8, 7, 4]], // 21
2626
[[ 77, 63, 48, 34], [ 47, 38, 29, 20], [ 32, 26, 20, 14], [ 20, 16, 12, 8]], // 25
2727
[[ 127, 101, 77, 58], [ 77, 61, 47, 35], [ 53, 42, 32, 24], [ 32, 26, 20, 15]], // 29
@@ -64,7 +64,7 @@ interface QRDataInterface{
6464
[[7089, 5596, 3993, 3057], [4296, 3391, 2420, 1852], [2953, 2331, 1663, 1273], [1817, 1435, 1024, 784]], // 177
6565
];
6666

67-
const MAX_BITS = [ 1 => // start at 1
67+
const MAX_BITS = [ null, // start at 1
6868
// MAX_BITS => [L, M, Q, H ]
6969
[ 152, 128, 104, 72],
7070
[ 272, 224, 176, 128],
@@ -111,7 +111,7 @@ interface QRDataInterface{
111111
/**
112112
* @link http://www.thonky.com/qr-code-tutorial/error-correction-table
113113
*/
114-
const RSBLOCKS = [ 1 => // start at 1
114+
const RSBLOCKS = [ null, // start at 1
115115
[[ 1, 0, 26, 19], [ 1, 0, 26, 16], [ 1, 0, 26, 13], [ 1, 0, 26, 9]], // 1
116116
[[ 1, 0, 44, 34], [ 1, 0, 44, 28], [ 1, 0, 44, 22], [ 1, 0, 44, 16]], //
117117
[[ 1, 0, 70, 55], [ 1, 0, 70, 44], [ 2, 0, 35, 17], [ 2, 0, 35, 13]], //

src/Data/QRMatrix.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class QRMatrix{
3636
/**
3737
* @link http://www.thonky.com/qr-code-tutorial/alignment-pattern-locations
3838
*/
39-
const alignmentPattern = [ 1 => // start at 1
39+
const alignmentPattern = [ null, // start at 1
4040
[],
4141
[6, 18],
4242
[6, 22],
@@ -82,8 +82,8 @@ class QRMatrix{
8282
/**
8383
* @link http://www.thonky.com/qr-code-tutorial/format-version-tables
8484
*/
85-
const versionPattern = [ 7 => // no version pattern for QR Codes < 7
86-
0x07c94, 0x085bc, 0x09a99, 0x0a4d3, // 7-10
85+
const versionPattern = [ // no version pattern for QR Codes < 7
86+
null , null , null , null , null , null , 0x07c94, 0x085bc, 0x09a99, 0x0a4d3,
8787
0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, 0x0f928, 0x10b78, 0x1145d, 0x12a17, 0x13532, 0x149a6,
8888
0x15683, 0x168c9, 0x177ec, 0x18ec4, 0x191e1, 0x1afab, 0x1b08e, 0x1cc1a, 0x1d33f, 0x1ed75,
8989
0x1f250, 0x209d5, 0x216f0, 0x228ba, 0x2379f, 0x24b0b, 0x2542e, 0x26a64, 0x27541, 0x28c69,

0 commit comments

Comments
 (0)