Showing 693 of 740 total issues
Function createSelectSqlPart
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function createSelectSqlPart(Criteria $criteria, array &$fromClause, bool $aliasAll = false): string
{
$selectClause = [];
if ($aliasAll) {
- 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 mergeWith
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function mergeWith(self $criteria, ?string $operator = null)
{
// merge limit
$limit = $criteria->getLimit();
if ($limit && $this->getLimit() === -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
Function getGroupBy
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function getGroupBy(Criteria $criteria): string
{
$groupBy = $criteria->getGroupByColumns();
if ($groupBy) {
- 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 17 (exceeds 5 allowed). Consider refactoring. Open
protected function addIndexes(Table $table): void
{
/** @var \PDOStatement $stmt */
$stmt = $this->dbh->query(sprintf('SHOW INDEX FROM %s', $this->getPlatform()->doQuoting($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 convertDOMElementToArray
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
protected function convertDOMElementToArray(DOMNode $data): array
{
$array = [];
$elementNames = [];
/** @var \DOMElement $element */
- 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 17 (exceeds 5 allowed). Consider refactoring. Open
protected function parseTables(array &$tableWraps, Database $database, ?Table $filterTable = null): void
{
$params = [];
$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 addDoInsertBodyWithIdMethod
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
protected function addDoInsertBodyWithIdMethod(): string
{
$table = $this->getTable();
$script = '';
foreach ($table->getPrimaryKey() 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 addFindPkSimple
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
protected function addFindPkSimple(string &$script): void
{
$table = $this->getTable();
// this method is not needed if the table has no primary key
- 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 buildModel
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
protected function buildModel(): Database
{
/** @var \Propel\Generator\Config\GeneratorConfig $config */
$config = $this->getGeneratorConfig();
$connection = $this->getConnection();
- 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 appendColumnNode
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
private function appendColumnNode(Column $column, DOMNode $parentNode): void
{
/** @var \DOMElement $columnNode */
$columnNode = $parentNode->appendChild($this->document->createElement('column'));
$columnNode->setAttribute('name', $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"
Further reading
Method mergeWith
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function mergeWith(self $criteria, ?string $operator = null)
{
// merge limit
$limit = $criteria->getLimit();
if ($limit && $this->getLimit() === -1) {
Method addCopyInto
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addCopyInto(string &$script): void
{
$table = $this->getTable();
$script .= "
Method addScopeAccessors
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addScopeAccessors(string &$script): void
{
$script .= "
/**
* Wrap the getter for scope value
Method findMethod
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function findMethod(string $methodName)
{
if (isset($this->knownMethodCache[$methodName])) {
return $this->knownMethodCache[$methodName];
}
Method compareTables
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function compareTables(bool $caseInsensitive = false): int
{
$fromDatabaseTables = $this->fromDatabase->getTables();
$toDatabaseTables = $this->toDatabase->getTables();
$databaseDifferences = 0;
Method appendDatabaseNode
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function appendDatabaseNode(Database $database, DOMNode $parentNode): void
{
/** @var \DOMElement $databaseNode */
$databaseNode = $parentNode->appendChild($this->document->createElement('database'));
$databaseNode->setAttribute('name', $database->getName());
File ConcreteInheritanceBehavior.php
has 257 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
ObjectCollection
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class ObjectCollection extends Collection
{
/**
* @var array
*/
AbstractManager
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class AbstractManager
{
/**
* Data models that we collect. One from each XML schema file.
*
Index
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class Index extends MappingModel
{
/**
* @var string|null
*/