Function compareColumns
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function compareColumns(bool $caseInsensitive = false): int
{
$fromTableColumns = $this->getFromTable()->getColumns();
$toTableColumns = $this->getToTable()->getColumns();
$columnDifferences = 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 compareForeignKeys
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function compareForeignKeys(bool $caseInsensitive = false): int
{
$fkDifferences = 0;
$fromTableFks = $this->getFromTable()->getForeignKeys();
$toTableFks = $this->getToTable()->getForeignKeys();
- 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 comparePrimaryKeys
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function comparePrimaryKeys(bool $caseInsensitive = false): int
{
$pkDifferences = 0;
$fromTablePk = $this->getFromTable()->getPrimaryKey();
$toTablePk = $this->getToTable()->getPrimaryKey();
- 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 compareIndices
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function compareIndices(bool $caseInsensitive = false): int
{
$indexDifferences = 0;
$fromTableIndices = array_merge($this->getFromTable()->getIndices(), $this->getFromTable()->getUnices());
$toTableIndices = array_merge($this->getToTable()->getIndices(), $this->getToTable()->getUnices());
- 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 compareColumns
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function compareColumns(bool $caseInsensitive = false): int
{
$fromTableColumns = $this->getFromTable()->getColumns();
$toTableColumns = $this->getToTable()->getColumns();
$columnDifferences = 0;
Method compareForeignKeys
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function compareForeignKeys(bool $caseInsensitive = false): int
{
$fkDifferences = 0;
$fromTableFks = $this->getFromTable()->getForeignKeys();
$toTableFks = $this->getToTable()->getForeignKeys();
Method comparePrimaryKeys
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function comparePrimaryKeys(bool $caseInsensitive = false): int
{
$pkDifferences = 0;
$fromTablePk = $this->getFromTable()->getPrimaryKey();
$toTablePk = $this->getToTable()->getPrimaryKey();
Method compareIndices
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function compareIndices(bool $caseInsensitive = false): int
{
$indexDifferences = 0;
$fromTableIndices = array_merge($this->getFromTable()->getIndices(), $this->getFromTable()->getUnices());
$toTableIndices = array_merge($this->getToTable()->getIndices(), $this->getToTable()->getUnices());