Showing 693 of 740 total issues
Function convertValueForColumn
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function convertValueForColumn($value, ColumnMap $colMap)
{
if ($colMap->getType() === 'OBJECT' && is_object($value)) {
$value = serialize($value);
} elseif ($colMap->getType() === 'ARRAY' && is_array($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 commit
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function commit(): bool
{
$return = true;
$opcount = $this->nestedTransactionCount;
- 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 init
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function init(?ConnectionInterface $con = null): void
{
$this->con = $con;
$maxRecordLimit = $this->getMaxRecordLimit();
$hasMaxRecordLimit = (bool)$maxRecordLimit;
- 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 10 (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 addClearAllReferences
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function addClearAllReferences(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 getCrossRefFKRemoveObjectNames
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function getCrossRefFKRemoveObjectNames(CrossForeignKeys $crossFKs, ForeignKey $excludeFK): string
{
$names = [];
$fks = $crossFKs->getCrossForeignKeys();
- 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 addDoOnDeleteSetNull
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function addDoOnDeleteSetNull(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 addClear
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function addClear(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 addDoOnDeleteCascade
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function addDoOnDeleteCascade(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 getConfiguredPlatform
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function getConfiguredPlatform(?ConnectionInterface $con = null, ?string $database = null): ?PlatformInterface
{
$platform = $this->get()['generator']['platformClass'];
if ($platform === null) {
- 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 getMigrationTimestamps
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function getMigrationTimestamps(): array
{
$path = $this->getWorkingDirectory();
$migrationTimestamps = [];
- 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 getTableOptions
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function getTableOptions(Table $table): array
{
$vi = $table->getVendorInfoForType('mysql');
$tableOptions = [];
// List of supported table options
- 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 addScopeAccessors
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function addScopeAccessors(string &$script): void
{
$script .= "
/**
* Wrap the getter for scope 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 objectMethods
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function objectMethods(ObjectBuilder $builder): string
{
$this->setBuilder($builder);
$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 addLoadValidatorMetadataMethod
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function addLoadValidatorMetadataMethod(): string
{
$params = $this->getParameters();
$constraints = [];
- 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 addObjectGetSyncParent
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function addObjectGetSyncParent(string &$script): void
{
$parentTable = $this->getParentTable();
$pkeys = $parentTable->getPrimaryKey();
$cptype = $pkeys[0]->getPhpType();
- 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 equals
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function equals(?object $obj): bool
{
// TODO: optimize me with early outs
if ($this === $obj) {
return true;
Method getConnection
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getConnection(array $params): PdoConnection
{
$params = $this->prepareParams($params);
if (!isset($params['dsn'])) {
Method toArray
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function toArray(string $data, ?string $rootKey = null, bool $isList = false, bool $includeHeading = true): array
{
$rows = explode($this->lineTerminator, $data);
if ($includeHeading) {
$heading = array_shift($rows);
Method format
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function format(?DataFetcherInterface $dataFetcher = null)
{
$this->checkInit();
if ($dataFetcher) {
$this->setDataFetcher($dataFetcher);