Showing 8 of 44 total issues
Method _buildSqlOrderBy
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function _buildSqlOrderBy($ordering)
{
$orderParts = [];
foreach ($ordering as $_order) {
Method _buildSelectSql
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function _buildSelectSql(
$columns,
$tables,
$joins = [],
LogicalExpressionInterface $where = null,
Method _buildSelectSql
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$columns,
$tables,
$joins = [],
LogicalExpressionInterface $where = null,
$ordering = null,
Method _buildUpdateSql
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function _buildUpdateSql(
$table,
$changeSet,
LogicalExpressionInterface $condition = null,
$ordering = null,
Function _buildSqlOrderBy
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function _buildSqlOrderBy($ordering)
{
$orderParts = [];
foreach ($ordering as $_order) {
- 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 _buildUpdateSql
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$table,
$changeSet,
LogicalExpressionInterface $condition = null,
$ordering = null,
$limit = null,
Method _buildDeleteSql
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$table,
LogicalExpressionInterface $condition = null,
$ordering = null,
$limit = null,
$offset = null,
Function _buildSqlRecordValues
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function _buildSqlRecordValues($columns, $record, array $valueHashMap = [])
{
$data = [];
foreach ($columns as $_columnName) {
- 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"