mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-27 18:48:13 +00:00
scrunitizer happier
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
filter:
|
||||
excluded_paths:
|
||||
- examples/*
|
||||
- tests/*
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ interface QRDataInterface{
|
||||
|
||||
/**
|
||||
* @param \chillerlan\QRCode\BitBuffer $buffer
|
||||
* @return void
|
||||
*/
|
||||
public function write(BitBuffer &$buffer);
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ class QRImage extends QROutputBase implements QROutputInterface{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
* @return string
|
||||
* @throws \chillerlan\QRCode\Output\QRCodeOutputException
|
||||
*/
|
||||
public function dump(){
|
||||
|
||||
+1
-5
@@ -78,11 +78,7 @@ class Util{
|
||||
$i += 2;
|
||||
}
|
||||
|
||||
if($i < $len){
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return !($i < $len);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user