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 ...'
File PdoAdapter.php
has 284 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
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 getConnection
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function getConnection(array $params): PdoConnection
{
$params = $this->prepareParams($params);
if (!isset($params['dsn'])) {
- 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 createSelectSqlPart
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createSelectSqlPart(Criteria $criteria, array &$fromClause, bool $aliasAll = false): string
{
$selectClause = [];
if ($aliasAll) {
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 bindValue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function bindValue(StatementInterface $stmt, string $parameter, $value, ColumnMap $cMap, ?int $position = null): bool
Function bindValues
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function bindValues(StatementInterface $stmt, array $params, DatabaseMap $dbMap): void
{
$position = 0;
foreach ($params as $param) {
$position++;
- 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 getPlainSelectedColumns
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getPlainSelectedColumns(Criteria $criteria): array
{
$selected = [];
foreach ($criteria->getSelectColumns() as $columnName) {
if (strpos($columnName, '(') === 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"