Showing 693 of 740 total issues
Function addClassBody
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function addClassBody(string &$script): void
{
$this->declareClassFromBuilder($this->getStubObjectBuilder());
$this->declareClassFromBuilder($this->getStubQueryBuilder());
$this->declareClassFromBuilder($this->getTableMapBuilder());
- 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 addIndexes
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function addIndexes(Table $table, int $oid): void
{
$stmt = $this->dbh->prepare("SELECT
DISTINCT ON(cls.relname)
cls.relname as idxname,
- 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 addIndexes
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function addIndexes(Table $table): void
{
/** @var \PDOStatement $stmt */
$stmt = $this->dbh->query('PRAGMA index_list("' . $table->getName() . '")');
- 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 parseTables
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function parseTables(Database $database, ?Table $filterTable = null): void
{
$sql = 'SHOW FULL TABLES';
if ($filterTable) {
- 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 addDoDelete
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function addDoDelete(string &$script): void
{
$table = $this->getTable();
$script .= "
/**
- 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 getColumnDDL
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function getColumnDDL(Column $col): string
{
$domain = $col->getDomain();
$ddl = [$this->quoteIdentifier($col->getName())];
- 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 appendModifiedFksToString
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function appendModifiedFksToString(string $ret): string
{
$modifiedFks = $this->getModifiedFks();
if ($modifiedFks) {
- 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 getModifyTableDDL
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function getModifyTableDDL(TableDiff $tableDiff): string
{
$changedNotEditableThroughDirectDDL = $this->tableAlteringWorkaround && (
$tableDiff->hasModifiedFks()
|| $tableDiff->hasModifiedIndices()
- 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 getUnclassifiedPrimaryKeys
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function getUnclassifiedPrimaryKeys(): array
{
$pks = [];
foreach ($this->getMiddleTable()->getPrimaryKey() as $pk) {
//required
- 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 addMultipleJoin
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function addMultipleJoin(array $conditions, ?string $joinType = null)
{
$join = new Join();
$join->setIdentifierQuoting($this->isIdentifierQuotingEnabled());
$joinCondition = null;
Method addFilterByPrimaryKeys
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addFilterByPrimaryKeys(string &$script): void
{
$script .= "
/**
* Filter the query by a list of primary keys
Method replaceNames
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function replaceNames(string &$sql): bool
{
$this->replacedColumns = [];
$this->currentAlias = '';
$this->foundMatch = false;
Method addClear
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addClear(string &$script): void
{
$table = $this->getTable();
$script .= "
Method addClassBody
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addClassBody(string &$script): void
{
$table = $this->getTable();
$this->declareClasses(
Method addSetByPosition
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addSetByPosition(string &$script): void
{
$table = $this->getTable();
$script .= "
/**
Method addGetPrimaryKeyFromRow
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addGetPrimaryKeyFromRow(string &$script): void
{
$script .= "
/**
* Retrieves the primary key from the DB resultset row
Method addFindPk
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addFindPk(string &$script): void
{
$class = $this->getObjectClassName();
$tableMapClassName = $this->getTableMapClassName();
$table = $this->getTable();
Method generateBlockStorage
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function generateBlockStorage($object, bool $isPrimaryKey = false): string
{
$vendorSpecific = $object->getVendorInfoForType('oracle');
if ($vendorSpecific->isEmpty()) {
return '';
Method addComputeDiff
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addComputeDiff(string &$script): void
{
$script .= "
/**
* Computes the diff between two versions.