:octocat: type hints for class constants

This commit is contained in:
smiley
2026-03-16 21:48:09 +01:00
parent 408f463832
commit 94931d8da2
45 changed files with 157 additions and 216 deletions
+8 -8
View File
@@ -37,15 +37,15 @@ final class Binarizer{
// This class uses 5x5 blocks to compute local luminance, where each block is 8x8 pixels.
// So this is the smallest dimension in each axis we can accept.
private const BLOCK_SIZE_POWER = 3;
private const BLOCK_SIZE = 8; // ...0100...00
private const BLOCK_SIZE_MASK = 7; // ...0011...11
private const MINIMUM_DIMENSION = 40;
private const MIN_DYNAMIC_RANGE = 24;
private const int BLOCK_SIZE_POWER = 3;
private const int BLOCK_SIZE = 8; // ...0100...00
private const int BLOCK_SIZE_MASK = 7; // ...0011...11
private const int MINIMUM_DIMENSION = 40;
private const int MIN_DYNAMIC_RANGE = 24;
# private const LUMINANCE_BITS = 5;
private const LUMINANCE_SHIFT = 3;
private const LUMINANCE_BUCKETS = 32;
# private const int LUMINANCE_BITS = 5;
private const int LUMINANCE_SHIFT = 3;
private const int LUMINANCE_BUCKETS = 32;
private LuminanceSourceInterface $source;
/** @var int[] */
+2 -2
View File
@@ -27,7 +27,7 @@ final class BitMatrix extends QRMatrix{
*
* [data bits, sequence after masking]
*/
private const DECODE_LOOKUP = [
private const array DECODE_LOOKUP = [
0x5412, // 0101010000010010
0x5125, // 0101000100100101
0x5E7C, // 0101111001111100
@@ -62,7 +62,7 @@ final class BitMatrix extends QRMatrix{
0x2BED, // 0010101111101101
];
private const FORMAT_INFO_MASK_QR = 0x5412; // 0101010000010010
private const int FORMAT_INFO_MASK_QR = 0x5412; // 0101010000010010
/**
* This flag has effect only on the copyVersionBit() method.