Showing 740 of 740 total issues
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 getColumnDefaultValueDDL
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getColumnDefaultValueDDL(Column $col): string
{
$default = '';
$defaultValue = $col->getDefaultValue();
if ($defaultValue !== null) {
Method addExtraIndices
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function addExtraIndices(): void
{
/**
* A collection of indexed columns. The key is the column name
* (concatenated with a comma in the case of multi-col index), the value is
Method setupObject
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function setupObject(): void
{
parent::setupObject();
$this->commonName = $this->originCommonName = $this->getAttribute('name');
Method queryMethods
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function queryMethods(AbstractOMBuilder $builder): string
{
$this->setBuilder($builder);
$this->builder->declareClasses(
'\Propel\Runtime\Propel',
Method modifyTable
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function modifyTable(): void
{
$table = $this->getTable();
$database = $table->getDatabase();
$delegates = explode(',', $this->parameters['to']);
Method addSequences
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addSequences(Database $database): void
{
$searchPath = '?';
$params = [$database->getSchema()];
if (!$database->getSchema()) {
Method addDeleteBody
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addDeleteBody(string &$script): void
{
$script .= "
if (\$this->isDeleted()) {
throw new PropelException(\"This object has already been deleted.\");
Method normalizeTable
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function normalizeTable(Table $table): void
{
if ($table->getPrimaryKey()) {
//search if there is already a UNIQUE constraint over the primary keys
$pkUniqueExist = false;
Function appendPsForUniqueClauseTo
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function appendPsForUniqueClauseTo(string &$sb, array &$params): void
{
$field = ($this->table === null) ? $this->column : $this->table . '.' . $this->column;
$db = $this->getAdapter();
// If selection is case insensitive use ILIKE for PostgreSQL or SQL
- 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 addPrimaryKey
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function addPrimaryKey(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 addSaveBody
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function addSaveBody(string &$script): void
{
$table = $this->getTable();
$reloadOnUpdate = $table->isReloadOnUpdate();
$reloadOnInsert = $table->isReloadOnInsert();
- 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 addCrossFKGet
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function addCrossFKGet(string &$script, CrossForeignKeys $crossFKs): void
{
$refFK = $crossFKs->getIncomingForeignKey();
$selfRelationName = $this->getFKPhpNameAffix($refFK, false);
$crossRefTableName = $crossFKs->getMiddleTable()->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 addEnsureConsistency
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function addEnsureConsistency(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 executeRollbackForDatasource
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function executeRollbackForDatasource(string $datasource, string $sql): void
{
$connection = $this->migrationManager->getConnection($datasource);
if ($this->isVerbose()) {
- 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 setAttribute
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function setAttribute($attribute, $value): bool
{
if (is_string($attribute)) {
if (strpos($attribute, '::') === false) {
if (defined('\PDO::' . $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 addCrossFKDoAdd
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function addCrossFKDoAdd(string &$script, CrossForeignKeys $crossFKs): void
{
$selfRelationNamePlural = $this->getFKPhpNameAffix($crossFKs->getIncomingForeignKey(), true);
$relatedObjectClassName = $this->getCrossFKsPhpNameAffix($crossFKs, false);
$className = $this->getClassNameFromTable($crossFKs->getIncomingForeignKey()->getTable());
- 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 addCrossFKInit
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function addCrossFKInit(string &$script, CrossForeignKeys $crossFKs): void
{
$inits = [];
if (1 < count($crossFKs->getCrossForeignKeys()) || $crossFKs->getUnclassifiedPrimaryKeys()) {
- 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 includeExternalSchemas
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function includeExternalSchemas(DOMDocument $dom, string $srcDir): int
{
$databaseNode = $dom->getElementsByTagName('database')->item(0);
$externalSchemaNodes = $dom->getElementsByTagName('external-schema');
- 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 getUsingCast
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function getUsingCast(Column $fromColumn, Column $toColumn): string
{
$fromSqlType = strtoupper($fromColumn->getDomain()->getSqlType());
$toSqlType = strtoupper($toColumn->getDomain()->getSqlType());
$name = $fromColumn->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"