Showing 197 of 203 total issues
Function castField
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public static function castField($value, $columnFlags, $import = true)
{
if (!($columnFlags & self::NOT_NULL) && $value === null) {
return 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"
Further reading
Function parseLines
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private function parseLines() {
$this->columns = new \stdClass();
$this->indexes = array();
$this->foreignKeys = 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 backTrace
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public static function backTrace($skip = 0, $return = self::TRACE_HTML)
{
//if (!self::$isActive) {
// return '';
// }
- 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 apply
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function apply()
{
if (self::$enableStateCache && isset(self::$applied[$this->table->entityClassName])) {
if ($this->log) {
$this->log->push(Expression::create(
Method build
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function build(Quoter $quoter = null) {
if ($this->binds) {
if ($quoter === null && $this->quoter !== null) {
$quoter = $this->quoter;
}
Function read
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function read(Request $request, array $options)
{
$this->def = new PrepareDefinition($options);
$tokens = $request->server()->argv;
- 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 perform
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function perform(Migration $migration, $action = Migration::APPLY)
{
if ($action === Migration::SKIP) {
return $this;
}
- 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 quote
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function quote($value)
{
if (null === $value) {
return 'NULL';
} elseif (is_int($value)) {
- 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 processToken
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private function processToken()
{
$optionFound = null;
if (($optionName = $this->token->afterStarts(Runner::OPTION_NAME)) && isset($this->def->byName[$optionName])) {
$optionFound = $this->def->byName[$optionName];
- 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 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($options)
{
$this->optionsArray = $options;
/** @var Option $hasVariadicArgument */
Method findSaved
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function findSaved()
{
$table = $this->table();
$statement = self::statement();
$data = $this->toArray(true);
Method getByColumn
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getByColumn(Column $column)
{
$flags = $column->flags;
$typeString = $this->getBaseType($column);
Method fetchAll
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function fetchAll($keyField = null, $valueField = null)
{
if (!$this->executed) {
$this->execute();
}
Method parseLines
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function parseLines() {
$this->columns = new \stdClass();
$this->indexes = array();
$this->foreignKeys = array();
Method makeAnchor
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function makeAnchor(State $commandState)
{
$commandClass = $commandState->commandClass;
$commandClasses = array();
if ($commandClass !== $this->definition->commandClass) {
Function get
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function get($key = null, Closure $addOnMiss = null)
{
if (null === $addOnMiss && $this->mode === self::MODE_CAPTURE) {
throw new Mock\Exception('Reading disabled in capture mode', Mock\Exception::PLAY_REQUIRED);
}
- 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 getUsage
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function getUsage() {
$usage = '';
if (!$this->isUnnamed) {
if ($this->shortName) {
$usage = Runner::OPTION_SHORT . $this->shortName;
- 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 addContent
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function addContent($message)
{
if ($message instanceof Progress) {
if ($this->console->attached()) {
if ($this->progressStartedLength) {
- 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 processColumns
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
protected function processColumns()
{
$this->alterLines->disable();
$intersect = 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 findLines
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
private function findLines()
{
foreach ($this->rows as $rowIndex => $row) {
foreach ($row as $key => $value) {
if (!$value instanceof Content\Text) {
- 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"