Pārlūkot izejas kodu

scrunitizer happier

smiley 9 gadi atpakaļ
vecāks
revīzija
422392f674

+ 1 - 0
.scrutinizer.yml

@@ -1,3 +1,4 @@
 filter:
   excluded_paths:
     - examples/*
+    - tests/*

+ 0 - 4
src/BitBuffer.php

@@ -38,8 +38,6 @@ class BitBuffer{
 	/**
 	 * @param int $num
 	 * @param int $length
-	 *
-	 * @return $this
 	 */
 	public function put($num, $length){
 
@@ -51,8 +49,6 @@ class BitBuffer{
 
 	/**
 	 * @param bool $bit
-	 *
-	 * @return $this
 	 */
 	public function putBit($bit){
 		$bufIndex = floor($this->length / 8);

+ 6 - 3
src/Data/QRDataBase.php

@@ -52,9 +52,12 @@ class QRDataBase{
 	public function getLengthInBits($type){
 
 		switch(true){
-			case $type >=  1 && $type <= 9: return $this->lengthBits[0]; //  1 -  9
-			case $type <= 26              : return $this->lengthBits[1]; // 10 - 26
-			case $type <= 40              : return $this->lengthBits[2]; // 27 - 40
+			case $type >= 1 && $type <= 9:
+				return $this->lengthBits[0]; //  1 -  9
+			case $type <= 26:
+				return $this->lengthBits[1]; // 10 - 26
+			case $type <= 40:
+				return $this->lengthBits[2]; // 27 - 40
 			default:
 				throw new QRCodeDataException('$type: '.$type);
 		}

+ 1 - 0
src/Data/QRDataInterface.php

@@ -22,6 +22,7 @@ interface QRDataInterface{
 
 	/**
 	 * @param \chillerlan\QRCode\BitBuffer $buffer
+	 * @return void
 	 */
 	public function write(BitBuffer &$buffer);
 

+ 1 - 1
src/Output/QRImage.php

@@ -59,7 +59,7 @@ class QRImage extends QROutputBase implements QROutputInterface{
 	}
 
 	/**
-	 * @return mixed
+	 * @return string
 	 * @throws \chillerlan\QRCode\Output\QRCodeOutputException
 	 */
 	public function dump(){

+ 1 - 5
src/Util.php

@@ -78,11 +78,7 @@ class Util{
 			$i += 2;
 		}
 
-		if($i < $len){
-			return false;
-		}
-
-		return true;
+		return !($i < $len);
 	}
 
 	/**