Showing 197 of 203 total issues
Function initOptions
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function initOptions()
{
foreach ($this->optionsArray as $name => $option) {
if ($option instanceof Option) {
if ($option->isUnnamed || $option->isRequired) {
- 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
ComplexStatement
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class ComplexStatement extends Expression implements
SelectInterface,
InsertInterface,
UpdateInterface,
DeleteInterface
Function __construct
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($options)
{
$this->optionsArray = $options;
/** @var Option $hasVariadicArgument */
- 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 getByColumn
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function getByColumn(Column $column)
{
$flags = $column->flags;
$typeString = $this->getBaseType($column);
- 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 buildValues
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
protected function buildValues(Quoter $quoter)
{
$result = '';
if ($this->values) {
$fields = 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
Method tokenize
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function tokenize($string)
{
$quoteStarted = false;
$escape = array();
$start = false;
Function render
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function render()
{
if ($this->withJsonZoom) {
$this->addCallbackOption('xAxis', 'events', 'afterSetExtremes', 'loadPoints');
$this->addCallbackOption('xAxis', 'events', 'setExtremes', 'setExtremesCallback');
- 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 current
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function current()
{
$row = parent::current();
if ($this->callback) {
$row = $this->callback->__invoke($row);
- 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 makeExpression
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
private function makeExpression(Parsed $parsed, &$binds, &$index) {
$statement = '';
foreach ($parsed->tokens as $token) {
if ($token instanceof Token) {
- 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 apply
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function apply()
{
if (self::$enableStateCache && isset(self::$applied[$this->table->entityClassName])) {
if ($this->log) {
$this->log->push(Expression::create(
- 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 parseResponseCookies
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
protected function parseResponseCookies()
{
$cookies = array();
$this->parsedHeaders = array();
foreach ($this->responseHeaders as $hdr) {
- 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 ComplexStatement.php
has 272 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
*
* create table test1 select * from sources
###
Method rollback
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function rollback()
{
if (self::$enableStateCache && isset(self::$rolledBack[$this->table->entityClassName])) {
if ($this->log) {
$this->log->push(Expression::create(
File CreateTableReader.php
has 267 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Yaoi\Database\Mysql;
use Yaoi\BaseClass;
File Entity.php
has 267 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Yaoi\Database;
use Yaoi\BaseClass;
Method build
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function build(Quoter $quoter = null)
{
if ($this->isEmpty()) {
return '';
}
HighCharts
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class HighCharts extends BaseClass implements Renderer
{
public function isEmpty()
{
Method makeExpression
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function makeExpression(Parsed $parsed, &$binds, &$index) {
$statement = '';
foreach ($parsed->tokens as $token) {
if ($token instanceof Token) {
Method varExportString
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function varExportString($string, $usePhpEol = true) {
static $specialChars = array(
"\r" => '\r',
"\n" => '\n',
"\t" => '\t',
Method findOrCreateInstance
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function findOrCreateInstance($serviceClassName, $identifier, $idIsSettings = false) {
//var_dump('=-=-=-=-=-=-=-=-=-=-=-=-=-=',$serviceClassName, $identifier, $idIsSettings);
if ($identifier instanceof Closure) {
$identifier = self::resolveClosure($identifier);