Showing 47 of 71 total issues
File Driver.php
has 535 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Created by PhpStorm.
* User: macbookpro
* Date: 15.02.2018
Function select
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
protected static function select(array &$stack, Statement\Select $statement)
{
self::literal($stack, 'SELECT ');
if (!$statement->projection) {
- 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
File Driver.php
has 516 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Created by PhpStorm.
* User: macbookpro
* Date: 15.02.2018
Function select
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
protected static function select(array &$stack, Statement\Select $statement)
{
self::literal($stack, 'SELECT ');
if (!$statement->projection) {
- 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 build
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public function build($statement): array
{
$stack = [];
$sql = [];
$values = [];
- 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 build
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public function build($statement): array
{
$stack = [];
$sql = [];
$values = [];
- 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 populate
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
function populate(array &$data, string $field)
{
$finder = $this->storage->find();
if ($this->filter) {
$finder = $finder->filter($this->filter);
- 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 populate
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
function populate(array &$data, string $field)
{
$finder = $this->storage->find();
if ($this->filter) {
$finder = $finder->filter($this->filter);
- 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 build
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function build($statement): array
{
$stack = [];
$sql = [];
$values = [];
Method build
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function build($statement): array
{
$stack = [];
$sql = [];
$values = [];
Function save
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
public function save(array $data): bool
{
$columns = [];
$values = [];
- 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 normalizeFilter
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
protected function normalizeFilter(?array $projection, array $filter): array
{
if (!$filter) {
return $filter;
}
- 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 schema
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function schema(string $source, bool $refresh = false): Schema
{
if (!$refresh && isset($this->schemas[$source])) {
return $this->schemas[$source];
}
Function insert
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
protected function insert(array &$stack, Statement\Insert $statement)
{
self::literal($stack, 'INSERT INTO ');
self::identifier($stack, $statement->source);
self::literal($stack, ' (');
- 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 select
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected static function select(array &$stack, Statement\Select $statement)
{
self::literal($stack, 'SELECT ');
if (!$statement->projection) {
Function insert
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
protected function insert(array &$stack, Statement\Insert $statement)
{
self::literal($stack, 'INSERT INTO ');
self::identifier($stack, $statement->source);
self::literal($stack, ' (');
- 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 normalizeFilter
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function normalizeFilter(?array $projection, array $filter): array
{
if (!$filter) {
return $filter;
}
Function update
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
protected function update(array &$stack, Statement\Update $statement)
{
self::literal($stack, 'UPDATE ');
if ($statement->offset) {
self::identifier($stack, $statement->source);
- 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 populate
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
function populate(array &$data, string $field)
{
$finder = $this->storage->find();
if ($this->filter) {
$finder = $finder->filter($this->filter);
Method populate
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
function populate(array &$data, string $field)
{
$finder = $this->storage->find();
if ($this->filter) {
$finder = $finder->filter($this->filter);