Showing 66 of 66 total issues
Item
has 99 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class Item extends \PHPixie\Database\Driver\Mongo\Query
implements \PHPixie\Database\Driver\Mongo\Conditions\Builder
{
public function __construct($connection, $parser, $builder)
{
Items
has 93 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class Items extends \PHPixie\Database\Driver\PDO\Query
implements \PHPixie\Database\Type\SQL\Query\Items,
\PHPixie\Database\Driver\PDO\Conditions\Builder
{
File Item.php
has 418 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace PHPixie\Database\Driver\Mongo\Query;
abstract class Item extends \PHPixie\Database\Driver\Mongo\Query
File Items.php
has 409 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace PHPixie\Database\Driver\PDO\Query;
abstract class Items extends \PHPixie\Database\Driver\PDO\Query
Select
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class Select extends \PHPixie\Database\Driver\PDO\Query\Items implements \PHPixie\Database\Type\SQL\Query\Type\Select
{
public function type()
{
return 'select';
Function appendInsertValues
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
protected function appendInsertValues($query, $expr)
{
if (($insertData = $query->getBatchData()) !== null) {
$columns = $insertData['columns'];
$rows = $insertData['rows'];
- 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
Container
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class Container implements \PHPixie\Database\Conditions\Builder
{
protected $groupStack = array();
protected $currentGroup;
protected $defaultOperator;
Function parse
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function parse($conditions, $convertMongoId = true)
{
$expanded = $this->parseLogic($conditions);
$andGroups = array();
- 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
Builder
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class Builder
{
protected $conditions;
File Parser.php
has 287 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace PHPixie\Database\Type\SQL;
abstract class Parser extends \PHPixie\Database\Parser
Container
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class Container extends \PHPixie\Database\Conditions\Builder\Container\Conditions
implements \PHPixie\Database\Type\Document\Conditions\Builder
{
public function __construct($conditions, $defaultOperator = '=')
{
Function addKeyValuesToArray
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
protected function addKeyValuesToArray($name, $args, $requireKeys = false, $firstParameterIsKey = true, $assertIsNumeric = false)
{
$array = $args[0];
if (!is_array($array)) {
- 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 addAnd
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function addAnd($condition)
{
$newGroups = array();
if($condition instanceof ExpandedGroup) {
$groups = $condition->groups();
- 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 appendInsertValues
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function appendInsertValues($query, $expr)
{
if (($insertData = $query->getBatchData()) !== null) {
$columns = $insertData['columns'];
$rows = $insertData['rows'];
Function appendUpdateValues
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
protected function appendUpdateValues($query, $expr)
{
$expr->sql .= " SET ";
$set = $query->getSet();
$increment = $query->getIncrement();
- 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 negate
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function negate()
{
$groups = array(array());
$count = count($this->groups);
$negated = array();
- 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 appendTable
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function appendTable($table, $expr, $alias = null)
{
if (is_string($table)) {
$table = explode('.', $table);
foreach($table as $key => $part) {
- 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 parse
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function parse($conditions, $convertMongoId = true)
{
$expanded = $this->parseLogic($conditions);
$andGroups = array();
Method appendUpdateValues
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function appendUpdateValues($query, $expr)
{
$expr->sql .= " SET ";
$set = $query->getSet();
$increment = $query->getIncrement();
Function parseCompare
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function parseCompare($field, $operator, $values)
{
$isColumn = false;
if (substr($operator, -1, 1) === '*') {
- 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"