Showing 149 of 161 total issues
Method logIn
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function logIn($eventClass) : float
{
$trace = $this->getTraceInfo();
$this->logger->info(sprintf(
Method getTraceInfo
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getTraceInfo(array $trace = null) : array
{
if ($trace === null) {
$trace = debug_backtrace(0);
}
Method testNullParameters
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testNullParameters() {
$parser = $this->getParser();
$parser->setStatement(
[
[
Method testValuesStatement
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testValuesStatement()
{
$builder = $this->getBuilder();
$fieldValues = [
[
Function getTraceInfo
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function getTraceInfo(array $trace = null) : array
{
if ($trace === null) {
$trace = debug_backtrace(0);
}
- 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 getSqlQuery
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function getSqlQuery(ParserInterface $parser = null)
{
if ($this->parser === null && $parser === null) {
throw new SystemException('No parser given');
}
- 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 compareProperties
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function compareProperties($left, $right, array $properties)
{
if (!is_object($left) || !is_object($right)) {
$this->fail('You must give me two objects');
}
Method testComparison
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testComparison()
{
$tests = [
'<=',
'<',
Method testGetPdo
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testGetPdo()
{
$pdo =
$this->getMockBuilder('\ChrisAndChris\Common\RowMapperBundle\Services\Pdo\PdoLayer')
->disableOriginalConstructor()
Method getSqlQuery
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getSqlQuery(ParserInterface $parser = null)
{
if ($this->parser === null && $parser === null) {
throw new SystemException('No parser given');
}
Function __construct
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function __construct(PdoLayer $layer, array $params = [])
{
// default connection defaults to write
$this->connections['w'] = [$layer];
$this->connections['r'] = [];
- 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 compareProperties
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function compareProperties($left, $right, array $properties)
{
if (!is_object($left) || !is_object($right)) {
$this->fail('You must give me two objects');
}
- 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 handle
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function handle(
PdoStatement $statement,
Entity $entity = null,
\Closure $callAfter = null,
array $mappingInfo = []
Method values
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function values(array $values = [])
{
if (is_array($values) && count($values) > 0) {
$this->append('values');
Function implodeIdentifier
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function implodeIdentifier($identifier, $d)
{
// $identifier = 'database:table:field'
if (!is_array($identifier) && strstr($identifier, ':') !== false) {
return $d . implode($d . '.' . $d, explode(':', $identifier)) . $d;
- 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 appendMultiple
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function appendMultiple($types)
{
if ($types instanceof Builder) {
$types = $types->getStatement();
} 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 minimizeBrace
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function minimizeBrace() {
if (count($this->braces) === 0) {
throw new MalformedQueryException(
'You must open braces before closing them.'
);
- 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 allowAppend
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function allowAppend()
{
// for speed, we first check only the last index
// if the last index says we should append, we check all other indexes
// any of the index must be 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
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
PdoFactory $pdoFactory,
RowMapperFactory $mapperFactory,
ErrorHandler $errorHandler,
BuilderFactory $builderFactory,
ContainerInterface $container = null,
Function getEntityFiller
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function getEntityFiller() : \Closure
{
return
function (
Entity &$entity,
- 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"