Showing 693 of 740 total issues
VersionableBehaviorObjectBuilderModifier
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
class VersionableBehaviorObjectBuilderModifier
{
/**
* @var \Propel\Generator\Behavior\Versionable\VersionableBehavior
*/
NestedSetBehaviorQueryBuilderModifier
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
class NestedSetBehaviorQueryBuilderModifier
{
/**
* @var \Propel\Generator\Behavior\NestedSet\NestedSetBehavior
*/
Function addColumns
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
protected function addColumns(Table $table): void
{
$tableName = $table->getName();
/** @var \PDOStatement $stmt */
- 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 joinSchemas
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function joinSchemas(array $schemas): void
{
foreach ($schemas as $schema) {
foreach ($schema->getDatabases(false) as $addDb) {
$addDbName = $addDb->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 applyLimit
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function applyLimit(string &$sql, int $offset, int $limit, ?Criteria $criteria = null): void
{
// split the select and from clauses out of the original query
$selectStatement = '';
$fromStatement = '';
Method addSaveBody
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addSaveBody(string &$script): void
{
$table = $this->getTable();
$reloadOnUpdate = $table->isReloadOnUpdate();
$reloadOnInsert = $table->isReloadOnInsert();
File OraclePlatform.php
has 313 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
PropelModelPager
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
class PropelModelPager implements IteratorAggregate, Countable
{
/**
* @var \Propel\Runtime\ActiveQuery\ModelCriteria
*/
PdoAdapter
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class PdoAdapter
{
/**
* Indicates if the database system can process DELETE statements with
* aliases like 'DELETE t FROM my_table t JOIN my_other_table o ON ...'
StatementWrapper
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
class StatementWrapper implements StatementInterface, IteratorAggregate
{
/**
* The wrapped statement class
*
Function simpleXmlToArray
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
protected static function simpleXmlToArray(SimpleXMLElement $xml): array
{
$ar = [];
foreach ($xml->children() as $k => $v) {
// recurse the child
- 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 24 (exceeds 5 allowed). Consider refactoring. Open
protected function parseTables(Database $database, ?Table $filterTable = null): void
{
$sql = "
SELECT name
FROM sqlite_master
- 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 addForeignKeys
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
protected function addForeignKeys(Table $table, int $oid): void
{
$database = $table->getDatabase();
$stmt = $this->dbh->prepare("SELECT
conname,
- 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 addCrossFkScheduledForDeletion
has a Cognitive Complexity of 24 (exceeds 5 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();
- 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 addClassBody
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addClassBody(string &$script): void
{
$this->declareClassFromBuilder($this->getStubObjectBuilder());
$this->declareClassFromBuilder($this->getStubQueryBuilder());
$this->declareClassFromBuilder($this->getTableMapBuilder());
File ConnectionWrapper.php
has 308 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 getColumnFromRow
has 84 lines of code (exceeds 25 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);
Method addFindPkSimple
has 84 lines of code (exceeds 25 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
RelationMap
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
class RelationMap
{
// types
/**
* @var int
Domain
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
class Domain extends MappingModel
{
/**
* @var string|null
*/