Showing 693 of 740 total issues
Function addClearRelatedInstancePool
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function addClearRelatedInstancePool(): string
{
$table = $this->getTable();
$relatedClassNames = [];
- 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 addDoInsert
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function addDoInsert(string &$script): void
{
$table = $this->getTable();
$tableMapClass = $this->getTableMapClass();
- 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 extractCrossInformation
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function extractCrossInformation(
CrossForeignKeys $crossFKs,
$crossFKToIgnore,
array &$signature,
array &$shortSignature,
- 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 addFKMutator
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function addFKMutator(string &$script, ForeignKey $fk): void
{
$fkTable = $fk->getForeignTable();
$interface = $fk->getInterface();
- 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 addRefFKGetJoinMethods
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function addRefFKGetJoinMethods(string &$script, ForeignKey $refFK): void
{
$table = $this->getTable();
$tblFK = $refFK->getTable();
$joinBehavior = $this->getBuildProperty('generator.objectModel.useLeftJoinsInDoJoinMethods') ? 'Criteria::LEFT_JOIN' : 'Criteria::INNER_JOIN';
- 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 isDeleteCascadeEmulationNeeded
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function isDeleteCascadeEmulationNeeded(): bool
{
$table = $this->getTable();
if ((!$this->getPlatform()->supportsNativeDeleteTrigger() || $this->getBuildProperty('generator.objectModel.emulateForeignKeyConstraints')) && count($table->getReferrers()) > 0) {
foreach ($table->getReferrers() as $fk) {
- 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 addBuildRelations
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function addBuildRelations(string &$script): void
{
$script .= "
/**
* Build the RelationMap objects for this table relationships
- 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 getMigrationTableDDL
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getMigrationTableDDL(TableDiff $tableDiff): string
{
$pattern = "
CREATE TEMPORARY TABLE %s AS SELECT %s FROM %s;
DROP TABLE %s;
- 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 computeDiff
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Database $fromDatabase,
Database $toDatabase,
bool $caseInsensitive = false,
bool $withRenaming = false,
bool $removeTable = true,
Function setupObject
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function setupObject(): void
{
try {
$database = $this->getDatabase();
$platform = ($this->hasPlatform()) ? $this->getPlatform() : null;
- 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 appendForeignKeyNode
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function appendForeignKeyNode(ForeignKey $foreignKey, DOMNode $parentNode): void
{
/** @var \DOMElement $foreignKeyNode */
$foreignKeyNode = $parentNode->appendChild($this->document->createElement('foreign-key'));
$foreignKeyNode->setAttribute('foreignTable', $foreignKey->getForeignTableCommonName());
- 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 addSyncParentToChild
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function addSyncParentToChild(string &$script): void
{
$parentTable = $this->getParentTable();
$parentClass = $this->builder->getClassNameFromBuilder($this->builder->getNewStubObjectBuilder($parentTable));
- 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 addBehavior
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function addBehavior($bdata): Behavior
{
if ($bdata instanceof Behavior) {
$behavior = $bdata;
- 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 addForeignKeyVersionColumns
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function addForeignKeyVersionColumns(): void
{
$versionTable = $this->versionTable;
foreach ($this->getVersionableFks() as $fk) {
$fkVersionColumnName = $fk->getLocalColumnName() . '_version';
- 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 generateName
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function generateName(array $inputs): string
{
$schemaName = (string)$inputs[0];
$method = (string)$inputs[1];
- 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
Consider simplifying this complex logical expression. Open
if (
$table
&& $table->getDatabase()
&& ($table->getSchema() || $table->getDatabase()->getSchema())
&& $table->getDatabase()->getPlatform()
Method addLocalValueCondition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
string $leftTableName,
string $leftColumnName,
?string $leftTableAlias,
$leftColumnValue,
string $operator = self::EQUAL
Method bindValue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function bindValue(StatementInterface $stmt, string $parameter, $value, ColumnMap $cMap, ?int $position = null): bool;
Method bindValue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function bindValue(StatementInterface $stmt, string $parameter, $value, ColumnMap $cMap, ?int $position = null): bool
Method bindValue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function bindValue(StatementInterface $stmt, string $parameter, $value, ColumnMap $cMap, ?int $position = null): bool