Showing 52 of 183 total issues
Avoid too many return
statements within this method. Open
return RationalTypeFactory::create($scalar);
Avoid too many return
statements within this method. Open
return $value;
Avoid too many return
statements within this method. Open
return ComplexTypeFactory::create(($scalar ? 1 : 0), 0);
Avoid too many return
statements within this method. Open
return ComplexTypeFactory::create($scalar);
Avoid too many return
statements within this method. Open
return $this->transform(new $tName(), $extra);
Avoid too many return
statements within this method. Open
return RationalTypeFactory::create($scalar)->asComplex();
Function doTransform
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function doTransform(Matrix $mA, $extra = null)
{
$this->assertMatrixIsNumeric($mA);
if (!array_key_exists('start', $extra)) {
- 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 getDeterminant
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function getDeterminant(NumericMatrix $mA)
{
switch ($this->method) {
case self::METHOD_AUTO;
if ($mA->rows() <= self::$luLimit) {
- 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 doComputation
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function doComputation(NumericMatrix $mA, NumericMatrix $mB)
{
$size = max([$mA->columns(), $mA->rows(), $mB->columns(), $mB->rows()]);
$product = (new ZMatrix())->create([$size, $size])->toArray();
$dA = $mA->toArray();
- 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 is
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function is(Matrix $mA)
{
try {
$this->assertMatrixIsNumeric($mA)
->assertMatrixIsSquare($mA);
- 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 doTransform
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function doTransform(Matrix $mA, $extra = null)
{
$this->assertMatrixIsNumeric($mA);
if ($mA->is('empty')) {
- 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 product
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function product($productName)
{
if (!array_key_exists($productName, $this->products)) {
throw new \InvalidArgumentException($productName);
}
- 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"