Showing 693 of 740 total issues
Method buildSchema
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
string $schema,
?string $dsn = null,
?string $user = null,
?string $pass = null,
?AdapterInterface $adapter = null,
Function fromArray
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function fromArray(array $array, ?string $rootKey = null, bool $isList = false, bool $includeHeading = true): string
{
$rows = [];
if ($isList) {
if ($includeHeading) {
- 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 loadBehavior
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function loadBehavior(array $package): ?array
{
if (isset($package['type']) && $package['type'] == self::BEHAVIOR_PACKAGE_TYPE) {
// find propel behavior information
if (isset($package['extra'])) {
- 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 executeRollbackToPreviousVersion
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function executeRollbackToPreviousVersion(int $currentVersion, ?int $previousVersion = null): bool
{
$this->output->writeln(sprintf(
'Executing migration %s down',
$this->migrationManager->getMigrationClassName($currentVersion),
- 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 select
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
string $question,
array $choices,
?string $default = null,
?int $attempts = null,
string $errorMessage = 'Value "%s" is invalid',
Function execute
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output): int
{
$consoleHelper = new ConsoleHelper($input, $output);
$this->getHelperSet()->set($consoleHelper);
- 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 execute
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output): int
{
$configOptions = [];
$connection = (string)$input->getArgument('connection');
- 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 addPrimaryKey
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
string $columnName,
string $phpName,
string $type,
bool $isNotNull = false,
?int $size = null,
Function addIndexes
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function addIndexes(Table $table): void
{
$columnNamesIndexedByIndexName = $this->getColumnNamesIndexedByIndexName($table);
foreach ($columnNamesIndexedByIndexName as $indexName => $columnNames) {
- 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 addColumnAttributes
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function addColumnAttributes(string &$script): void
{
$table = $this->getTable();
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 execute
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output): int
{
$configOptions = [];
if ($this->hasInputOption('connection', $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 addClassOpen
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function addClassOpen(string &$script): void
{
$table = $this->getTable();
$tableName = $table->getName();
$tableDesc = $table->getDescription();
- 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 validateDatabaseTables
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function validateDatabaseTables(Database $database): void
{
$phpNames = [];
$namespaces = [];
foreach ($database->getTables() as $table) {
- 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 isDeleteSetNullEmulationNeeded
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function isDeleteSetNullEmulationNeeded(): bool
{
$table = $this->getTable();
if ((!$this->getPlatform()->supportsNativeDeleteTrigger() || $this->getBuildProperty('generator.objectModel.emulateForeignKeyConstraints')) && count($table->getReferrers()) > 0) {
foreach ($table->getReferrers() as $fk) {
- 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 addClassOpen
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function addClassOpen(string &$script): void
{
if ($this->getChild()->getAncestor()) {
$ancestorClassName = $this->getChild()->getAncestor();
if ($this->getDatabase()->hasTableByPhpName($ancestorClassName)) {
- 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 addFilterByPrimaryKeys
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function addFilterByPrimaryKeys(string &$script): void
{
$script .= "
/**
* Filter the query by a list of primary keys
- 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 addBuildRelations
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function addBuildRelations(string &$script): void
{
$script .= "
/**
* Build the RelationMap objects for this table relationships
- 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 addClearRelatedInstancePool
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function addClearRelatedInstancePool(): string
{
$table = $this->getTable();
$relatedClassNames = [];
- 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 extractCrossInformation
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
CrossForeignKeys $crossFKs,
$crossFKToIgnore,
array &$signature,
array &$shortSignature,
array &$normalizedShortSignature,
Function addFKMutator
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function addFKMutator(string &$script, ForeignKey $fk): void
{
$fkTable = $fk->getForeignTable();
$interface = $fk->getInterface();
- 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"