Showing 21 of 64 total issues
Function set
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function set($row, $col, $data)
{
if ($row < 0 || $row > $this->rows()) {
throw new VerticeOutOfBoundsException('row', $row);
}
- 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 16 (exceeds 5 allowed). Consider refactoring. Open
public function is(Matrix $mA)
{
if (!$mA->is('square')) {
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 checkEntryEquality
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function checkEntryEquality(Matrix $mB, $strict)
{
$dA = $this->toArray();
$dB = $mB->toArray();
$m = $this->rows();
- 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
Method set
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function set($row, $col, $data)
{
if ($row < 0 || $row > $this->rows()) {
throw new VerticeOutOfBoundsException('row', $row);
}
Method doTransform
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function doTransform(Matrix $mA, $extra = null)
{
/** @noinspection PhpInternalEntityUsedInspection */
$this->assertParameterIsArray($extra, 'Second operand is not an array');
Method is
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function is(Matrix $mA)
{
//empty matrix is ok
if ($mA->is('empty')) {
return true;
Method doTransform
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function doTransform(Matrix $mA, $extra = null)
{
$this->assertMatrixIsComplete($mA);
if ($mA->is('empty')) {
Function doTransform
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function doTransform(Matrix $mA, $extra = null)
{
/** @noinspection PhpInternalEntityUsedInspection */
$this->assertParameterIsArray($extra, 'Second operand is not an array');
- 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 __construct
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($source, $complete = false, $normalize= false, $normalizeDefault = null)
{
if ($source instanceof Matrix) {
$this->store($source->toArray());
return;
- 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 8 (exceeds 5 allowed). Consider refactoring. Open
protected function doTransform(Matrix $mA, $extra = null)
{
$this->assertMatrixIsComplete($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 get
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function get($row, $col)
{
if ($row < 0 || $row > $this->rows()) {
throw new VerticeOutOfBoundsException('row', $row);
}
- 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 $this->reduceRows($mA, abs($numRows));
Avoid too many return
statements within this method. Open
return ($direction == 1 ? $ret : $fReflect($ret, Reflect::REFL_Y));
Avoid too many return
statements within this method. Open
return (
$numRows > 0
? $this->addRows($interim, $numRows, $defValue)
: $this->reduceRows($interim, abs($numRows))
);
Function doTransform
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function doTransform(Matrix $mA, $extra = null)
{
if ($mA->is('empty')) {
return new Matrix(array());
}
- 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)
{
if (is_null($extra)) {
throw new TransformationException('Reflection plane not specified');
} else {
- 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 test
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function test($attribute)
{
if (is_string($attribute)) {
$attribute = ucfirst(strtolower($attribute));
$class = self::NS_ATTRIBUTE. $attribute;
- 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)
{
if ($mA->is('empty')) {
return new Matrix([]);
}
- 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)
{
if ($mA->is('empty')) {
return new Matrix([]);
}
- 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)
{
if ($mA->is('empty')) {
return new Matrix(array());
}
- 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"