Showing 693 of 740 total issues
Method getAddTableDDL
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getAddTableDDL(Table $table): string
{
$tableDescription = $table->hasDescription() ? $this->getCommentLineDDL($table->getDescription()) : '';
$lines = [];
Method addMoveToRank
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addMoveToRank(string &$script): void
{
$useScope = $this->behavior->useScope();
$script .= "
/**
Method syncTables
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function syncTables(): Table
{
$archiveTable = $this->getArchiveTable();
$sourceTable = $this->getTable();
Method addInsertAsPrevSiblingOf
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addInsertAsPrevSiblingOf(string &$script): void
{
$objectClassName = $this->builder->getObjectClassName();
$queryClassName = $this->builder->getQueryClassName(true);
$useScope = $this->behavior->useScope();
Method addInsertAsNextSiblingOf
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addInsertAsNextSiblingOf(string &$script): void
{
$objectClassName = $this->builder->getObjectClassName();
$queryClassName = $this->builder->getQueryClassName(true);
$useScope = $this->behavior->useScope();
Method addForeignPrimaryKey
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
string $columnName,
string $phpName,
string $type,
string $fkTable,
string $fkColumn,
Method addRelation
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
string $name,
string $tablePhpName,
int $type,
array $joinConditionMapping = [],
?string $onDelete = null,
Method addForeignKey
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
string $columnName,
string $phpName,
string $type,
string $fkTable,
string $fkColumn,
Function __construct
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function __construct(int $error)
{
$message = 'Error while parsing Json configuration file: ';
if (!function_exists('json_last_error_msg')) {
- 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 configureSelectColumns
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function configureSelectColumns(): void
{
if (!$this->select) {
return;
}
- 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 quoteIdentifier
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function quoteIdentifier(string $string, string $tableName = ''): string
{
if ($this->isIdentifierQuotingEnabled()) {
$adapter = Propel::getServiceContainer()->getAdapter($this->getDbName());
- 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 commit
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function commit(): bool
{
$return = true;
$opcount = $this->getNestedTransactionCount();
if ($opcount > 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 createDateTime
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected static function createDateTime($value, ?DateTimeZone $timeZone = null, string $dateTimeClass = 'DateTime')
{
if (static::isTimestamp($value)) { // if it's a unix timestamp
$format = 'U';
if (strpos($value, '.')) {
- 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 loadBehaviorsFromLockFile
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function loadBehaviorsFromLockFile(SplFileInfo $composerLock): array
{
$behaviors = [];
$json = json_decode($composerLock->getContents(), true);
- 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 getBehaviors
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function getBehaviors(): array
{
if ($this->behaviors === null) {
// find behaviors in composer.lock file
$lock = $this->findComposerLock();
- 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 addHasOnlyDefaultValuesBody
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function addHasOnlyDefaultValuesBody(string &$script): void
{
$table = $this->getTable();
$colsWithDefaults = [];
foreach ($table->getColumns() as $col) {
- 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 addFilterByFk
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function addFilterByFk(string &$script, ForeignKey $fk): void
{
$this->declareClasses(
'\Propel\Runtime\Collection\ObjectCollection',
'\Propel\Runtime\Exception\PropelException',
- 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 addLazyLoaderBody
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function addLazyLoaderBody(string &$script, Column $column): void
{
$platform = $this->getPlatform();
$clo = $column->getLowercasedName();
- 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 addReload
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function addReload(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 addColumn
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function addColumn($data): void
{
if ($data instanceof Column) {
$column = $data;
$this->columns[] = $column->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"