codemasher 5 лет назад
Родитель
Сommit
8c0a79bae8
2 измененных файлов с 1 добавлено и 3 удалено
  1. 0 2
      src/Data/Number.php
  2. 1 1
      src/Helpers/BitBuffer.php

+ 0 - 2
src/Data/Number.php

@@ -47,11 +47,9 @@ class Number extends QRDataAbstract{
 			if($this->strlen - $i === 1){
 				$this->bitBuffer->put($this->parseInt(substr($data, $i, $i + 1)), 4);
 			}
-			// @codeCoverageIgnoreStart
 			elseif($this->strlen - $i === 2){
 				$this->bitBuffer->put($this->parseInt(substr($data, $i, $i + 2)), 7);
 			}
-			// @codeCoverageIgnoreEnd
 
 		}
 

+ 1 - 1
src/Helpers/BitBuffer.php

@@ -45,7 +45,7 @@ class BitBuffer{
 	public function put(int $num, int $length):BitBuffer{
 
 		for($i = 0; $i < $length; $i++){
-			$this->putBit(($num >> ($length - $i - 1))&1 === 1);
+			$this->putBit((($num >> ($length - $i - 1)) & 1) === 1);
 		}
 
 		return $this;