Showing 91 of 100 total issues
Method init_rs
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function init_rs ($symsize, $gfpoly, $fcr, $prim, $nroots, $pad)
Method makeMaskNo
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function makeMaskNo ($maskNo, $width, $s, &$d, $maskGenOnly = false)
Method encodeString
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function encodeString (string $string, int $version, $level, int $hint, bool $caseSensitive)
Method raw
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function raw (string $text, $outfile = false, int $level = QR_ECLEVEL_L, int $size = 3, int $margin = 4)
Method strSet
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function strSet (array &$srctab, int $x, int $y, string $repl, $replLen = false) : void
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct ($dl, $data, $el, array &$ecc, RsItem $rs)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(\DateTime $dateTimeStart, \DateTime $dateTimeEnd, string $summary, string $description = '', string $location = '')
Method image
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function image (array $frame, int $pixelPerPoint = 4, int $outerFrame = 4, int $backColor = QR_WHITE, int $foreColor = QR_BLACK)
Method text
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function text (string $text, $outfile = false, $level = QR_ECLEVEL_L, int $size = 3, int $margin = 4) : array
Method jpg
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function jpg (array $frame, $filename = false, int $pixelPerPoint = 8, int $outerFrame = 4, int $quality = 85) : void
Method vectSVG
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private static function vectSVG ($frame, int $pixelPerPoint = 4, int $outerFrame = 4, int $backColor = 0xFFFFFF, int $foreColor = 0x000000) : string
Function checkModeKanji
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function checkModeKanji (int $size, $data) : bool
{
if ($size & 1)
return false;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function generateMaskNo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function generateMaskNo ($maskNo, int $width, array $frame) : array
{
$bitMask = array_fill(0, $width, array_fill(0, $width, 0));
for ($y = 0; $y < $width; $y++) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function newFromBytes
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function newFromBytes ($size, $data) : BitStream
{
$bitStream = new self();
$bitStream->allocate($size * 8);
$p = 0;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function toByte
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function toByte () : array
{
$size = $this->size();
if ($size == 0) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function log
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function log ($outfile, string $err) : void
{
if (QR_LOG_DIR !== false) {
if ($err != '') {
$data = date('Y-m-d H:i:s') . ': ' . $err . PHP_EOL;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function vectSVG
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static function vectSVG ($frame, int $pixelPerPoint = 4, int $outerFrame = 4, int $backColor = 0xFFFFFF, int $foreColor = 0x000000) : string
{
$h = count($frame);
$w = strlen($frame[0]);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid too many return
statements within this method. Open
return $rs;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return QR_MODE_8;