Showing 693 of 740 total issues
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return ' USING NULL';
Avoid too many return
statements within this method. Open
return $behavior;
Avoid too many return
statements within this method. Open
return $fromFk->isSkipSql() !== $toFk->isSkipSql();
Avoid too many return
statements within this method. Open
return sprintf("'%s'", $defaultValue->getValue());
Avoid too many return
statements within this method. Open
return $this->defaultValue->getValue();
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return false;
Function applyLimit
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function applyLimit(string &$sql, int $offset, int $limit, ?Criteria $criteria = null): void
{
$params = [];
if ($criteria && $criteria->needsSelectAliases()) {
$crit = clone $criteria;
- 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 create
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function create(string $driver): AdapterInterface
{
if (!$driver) {
$adapterClass = '\Propel\Runtime\Adapter\NoneAdapter';
} elseif (strpos($driver, '\\') === false) {
- 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 needsSelectAliases
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function needsSelectAliases(): bool
{
$columnNames = [];
foreach ($this->getSelectColumns() as $fullyQualifiedColumnName) {
$pos = strrpos($fullyQualifiedColumnName, '.');
- 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 convertIntToArray
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function convertIntToArray(?string $val, array $valueSet): array
{
if ($val === null) {
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 addColumnAttributeComment
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function addColumnAttributeComment(string &$script, Column $column): void
{
if ($column->isTemporalType()) {
$cptype = $this->getDateTimeClass($column);
} else {
- 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 addPrimaryKey
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function addPrimaryKey(Table $table): void
{
/** @var \PDOStatement $stmt */
$stmt = $this->dbh->query(sprintf('SHOW KEYS 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 execute
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output): int
{
$configManager = new ConfigurationManager($input->getOption('config-dir'));
$outputDir = $input->getOption('output-dir') ?? $configManager->getConfigProperty('paths.phpConfDir');
- 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 getColumnMappings
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getColumnMappings(int $direction = self::LOCAL_TO_FOREIGN): array
{
$h = [];
if (
$direction === self::LEFT_TO_RIGHT
- 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 prepare
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function prepare(string $statement, array $driverOptions = [])
{
if ($this->isCachePreparedStatements && isset($this->cachedPreparedStatements[$statement])) {
$statementWrapper = $this->cachedPreparedStatements[$statement];
} else {
- 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"