Passed
Push — main ( a9949d...738294 )
by smiley
01:55
created
src/Common/FormatInformation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,8 +80,8 @@
 block discarded – undo
80 80
 	 * Receives the format information from a parsed QR Code, detects ECC level and mask pattern
81 81
 	 */
82 82
 	public function __construct(int $formatInfo){
83
-		$this->errorCorrectionLevel = ($formatInfo >> 3) & 0x03; // Bits 3,4
84
-		$this->maskPattern          = ($formatInfo & 0x07); // Bottom 3 bits
83
+		$this->errorCorrectionLevel = ($formatInfo >> 3)&0x03; // Bits 3,4
84
+		$this->maskPattern          = ($formatInfo&0x07); // Bottom 3 bits
85 85
 	}
86 86
 
87 87
 	/**
Please login to merge, or discard this patch.
src/Common/ECICharset.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -18,16 +18,16 @@  discard block
 block discarded – undo
18 18
  */
19 19
 final class ECICharset{
20 20
 
21
-	public const CP437                 = 0;  // Code page 437, DOS Latin US
22
-	public const ISO_IEC_8859_1_GLI    = 1;  // GLI encoding with characters 0 to 127 identical to ISO/IEC 646 and characters 128 to 255 identical to ISO 8859-1
23
-	public const CP437_WO_GLI          = 2;  // An equivalent code table to CP437, without the return-to-GLI 0 logic
24
-	public const ISO_IEC_8859_1        = 3;  // Latin-1 (Default)
25
-	public const ISO_IEC_8859_2        = 4;  // Latin-2
26
-	public const ISO_IEC_8859_3        = 5;  // Latin-3
27
-	public const ISO_IEC_8859_4        = 6;  // Latin-4
28
-	public const ISO_IEC_8859_5        = 7;  // Latin/Cyrillic
29
-	public const ISO_IEC_8859_6        = 8;  // Latin/Arabic
30
-	public const ISO_IEC_8859_7        = 9;  // Latin/Greek
21
+	public const CP437                 = 0; // Code page 437, DOS Latin US
22
+	public const ISO_IEC_8859_1_GLI    = 1; // GLI encoding with characters 0 to 127 identical to ISO/IEC 646 and characters 128 to 255 identical to ISO 8859-1
23
+	public const CP437_WO_GLI          = 2; // An equivalent code table to CP437, without the return-to-GLI 0 logic
24
+	public const ISO_IEC_8859_1        = 3; // Latin-1 (Default)
25
+	public const ISO_IEC_8859_2        = 4; // Latin-2
26
+	public const ISO_IEC_8859_3        = 5; // Latin-3
27
+	public const ISO_IEC_8859_4        = 6; // Latin-4
28
+	public const ISO_IEC_8859_5        = 7; // Latin/Cyrillic
29
+	public const ISO_IEC_8859_6        = 8; // Latin/Arabic
30
+	public const ISO_IEC_8859_7        = 9; // Latin/Greek
31 31
 	public const ISO_IEC_8859_8        = 10; // Latin/Hebrew
32 32
 	public const ISO_IEC_8859_9        = 11; // Latin-5
33 33
 	public const ISO_IEC_8859_10       = 12; // Latin-6
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 * @see \mb_convert_encoding()
118 118
 	 * @see \iconv()
119 119
 	 */
120
-	public function getName():?string{
120
+	public function getName(): ?string{
121 121
 		return self::MB_ENCODINGS[$this->charsetID];
122 122
 	}
123 123
 
Please login to merge, or discard this patch.
src/Common/BitBuffer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	/**
39 39
 	 * Read count (bits)
40 40
 	 */
41
-	private int $bitsRead  = 0;
41
+	private int $bitsRead = 0;
42 42
 
43 43
 	/**
44 44
 	 * BitBuffer constructor.
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	public function put(int $bits, int $length):self{
57 57
 
58 58
 		for($i = 0; $i < $length; $i++){
59
-			$this->putBit((($bits >> ($length - $i - 1)) & 1) === 1);
59
+			$this->putBit((($bits >> ($length - $i - 1))&1) === 1);
60 60
 		}
61 61
 
62 62
 		return $this;
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 			$toRead         = min($numBits, $bitsLeft);
125 125
 			$bitsToNotRead  = $bitsLeft - $toRead;
126 126
 			$mask           = (0xff >> (8 - $toRead)) << $bitsToNotRead;
127
-			$result         = ($this->buffer[$this->bytesRead] & $mask) >> $bitsToNotRead;
127
+			$result         = ($this->buffer[$this->bytesRead]&$mask) >> $bitsToNotRead;
128 128
 			$numBits        -= $toRead;
129 129
 			$this->bitsRead += $toRead;
130 130
 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 		if($numBits > 0){
139 139
 
140 140
 			while($numBits >= 8){
141
-				$result = ($result << 8) | ($this->buffer[$this->bytesRead] & 0xff);
141
+				$result = ($result << 8)|($this->buffer[$this->bytesRead]&0xff);
142 142
 				$this->bytesRead++;
143 143
 				$numBits -= 8;
144 144
 			}
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 			if($numBits > 0){
148 148
 				$bitsToNotRead  = 8 - $numBits;
149 149
 				$mask           = (0xff >> $bitsToNotRead) << $bitsToNotRead;
150
-				$result         = ($result << $numBits) | (($this->buffer[$this->bytesRead] & $mask) >> $bitsToNotRead);
150
+				$result         = ($result << $numBits)|(($this->buffer[$this->bytesRead]&$mask) >> $bitsToNotRead);
151 151
 				$this->bitsRead += $numBits;
152 152
 			}
153 153
 		}
Please login to merge, or discard this patch.