Showing 694 of 741 total issues
Function execute
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output): int
{
$configOptions = [];
if ($this->hasInputOption('output-dir', $input)) {
- 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 addInitialize
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
protected function addInitialize(string &$script): void
{
$table = $this->getTable();
/** @var \Propel\Generator\Platform\DefaultPlatform $platform */
$platform = $this->getPlatform();
- 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 getColumnFromRow
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function getColumnFromRow(array $row, Table $table): Column
{
$name = $row['Field'];
$isNullable = ($row['Null'] === 'YES');
$autoincrement = (strpos($row['Extra'], 'auto_increment') !== 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 getModifyColumnDDL
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function getModifyColumnDDL(ColumnDiff $columnDiff): string
{
$ret = '';
$changedProperties = $columnDiff->getChangedProperties();
- 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 modifyTable
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function modifyTable(): void
{
$table = $this->getTable();
$parentTable = $this->getParentTable();
- 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
ConnectionWrapper
has 38 functions (exceeds 20 allowed). Consider refactoring. Open
class ConnectionWrapper implements ConnectionInterface, LoggerAwareInterface
{
use TransactionTrait;
/**
File Join.php
has 373 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* MIT License. This file is part of the Propel package.
* For the full copyright and license information, please view the LICENSE
Function getColumnDDL
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function getColumnDDL(Column $col): string
{
$domain = $col->getDomain();
$sqlType = $domain->getSqlType();
$notNullString = $this->getNullString($col->isNotNull());
- 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 addCrossFKGet
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addCrossFKGet(string &$script, CrossForeignKeys $crossFKs): void
{
$refFK = $crossFKs->getIncomingForeignKey();
$selfRelationName = $this->getFKPhpNameAffix($refFK, false);
$crossRefTableName = $crossFKs->getMiddleTable()->getName();
Method addCrossFkScheduledForDeletion
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addCrossFkScheduledForDeletion(string &$script, CrossForeignKeys $crossFKs): void
{
$multipleFks = 1 < count($crossFKs->getCrossForeignKeys()) || (bool)$crossFKs->getUnclassifiedPrimaryKeys();
$scheduledForDeletionVarName = $this->getCrossScheduledForDeletionVarName($crossFKs);
$queryClassName = $this->getNewStubQueryBuilder($crossFKs->getMiddleTable())->getClassname();
File XmlDumper.php
has 367 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* MIT License. This file is part of the Propel package.
* For the full copyright and license information, please view the LICENSE
Method execute
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$configOptions = [];
if ($this->hasInputOption('output-dir', $input)) {
Method execute
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output): int
{
$configOptions = [];
if ($this->hasInputOption('output-dir', $input)) {
Method addDoInsertBodyRaw
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addDoInsertBodyRaw(): string
{
$this->declareClasses(
'\Propel\Runtime\Propel',
'\PDO',
File SortableBehaviorQueryBuilderModifier.php
has 362 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* MIT License. This file is part of the Propel package.
* For the full copyright and license information, please view the LICENSE
Function addHydrateBody
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
protected function addHydrateBody(string &$script): void
{
$table = $this->getTable();
$platform = $this->getPlatform();
- 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 convert
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public static function convert(array $c): string
{
$conf = [];
// set datasources
if (isset($c['connections'])) {
- 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 appendTableNode
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
private function appendTableNode(Table $table, DOMNode $parentNode): void
{
/** @var \DOMElement $tableNode */
$tableNode = $parentNode->appendChild($this->document->createElement('table'));
$tableNode->setAttribute('name', $table->getCommonName());
- 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 addDoSave
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addDoSave(string &$script): void
{
$table = $this->getTable();
$reloadOnUpdate = $table->isReloadOnUpdate();
MigrationManager
has 34 functions (exceeds 20 allowed). Consider refactoring. Open
class MigrationManager extends AbstractManager
{
use PathTrait;
/**