DataAccessObjectFactory
has 57 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class DataAccessObjectFactory extends DatabaseProcessor implements TableInterface
{
private $fields = array();
private $conditional;
private $joinClause = '';
File DataAccessObjectFactory.php
has 414 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Parm;
use Parm\Binding\Binding;
Function setSelectFields
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function setSelectFields($arrayOfFields)
{
if ($arrayOfFields == null) {
throw new Exception\ErrorException('setSelectFields($arrayOfFields) $arrayOfFields can\'t be null.');
} elseif (func_num_args() == 1 && is_array($arrayOfFields)) {
- 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 groupBy
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function groupBy($fieldOrArray)
{
if (func_num_args() > 1) {
// passed multiple fields $f->addGroupBy("first_name","last_name")
$this->groupBy(func_get_args());
- 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 getObjects
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getObjects()
{
$data = array();
if (static::getIdField() != 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"