Showing 203 of 203 total issues
Method set
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function set($expression, $binds = null)
{
if (null === $expression) {
return $this;
}
Method connect
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function connect()
{
$host = $this->dsn->hostname;
if ($this->dsn->persistent) {
if (is_null($host)) {
Method buildForeignKeys
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function buildForeignKeys() {
foreach ($this->foreignKeys as $data) {
$name = $data[0];
$localColumnNames = $data[1];
$localColumns = array();
Method getColumnFlagsByString
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getColumnFlagsByString($typeString) {
$phpType = Column::AUTO_TYPE;
switch (true) {
case 'integer' === substr($typeString, 0, 7):
Method parseConstraint
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function parseConstraint(Parser $parser) {
$indexName = $this->resolve($parser->inner('CONSTRAINT', 'FOREIGN KEY', false, true));
$indexColumns = $parser->inner('(', ')')->explode(',');
foreach ($indexColumns as &$columnName) {
$columnName = $this->resolve($columnName);
Function parseConstraint
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function parseConstraint(Parser $parser) {
$indexName = $this->resolve($parser->inner('CONSTRAINT', 'FOREIGN KEY', false, true));
$indexColumns = $parser->inner('(', ')')->explode(',');
foreach ($indexColumns as &$columnName) {
$columnName = $this->resolve($columnName);
- 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 renderContentChunk
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function renderContentChunk($content)
{
$contentExists = false;
if (($content instanceof IsEmpty) && !$content->isEmpty()) {
$contentExists = true;
- 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 readIndexes
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function readIndexes(Table $def) {
$res = $this->database->select()
->select('t.relname as table_name, i.relname as index_name, a.attname as column_name')
->select('ix.indisunique::int as is_unique,ix.indisprimary::int as is_primary')
->from('pg_class t, pg_class i, pg_index ix, pg_attribute a')
- 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 run
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function run(Request $request = null)
{
if (null === $request) {
$request = Request::createAuto();
}
- 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 processIndexes
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function processIndexes() {
/** @var Index[] $beforeIndexes */
$beforeIndexes = array();
foreach ($this->before->indexes as $index) {
$beforeIndexes [$index->getName()]= $index;
- 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 parseUrl
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function parseUrl() {
$p = $this->prepareParseUrl();
if (isset($p['query'])) {
parse_str($p['query'], $parsed);
- 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 prepareCommand
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function prepareCommand(Command\Definition $definition)
{
$commandClass = $definition->commandClass;
/** @var Command $command */
- 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 fetchColumns
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function fetchColumns($key = null, $value = null)
{
$this->rewind();
$result = 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 processOption
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function processOption()
{
if ($this->option->isRequired) {
unset($this->def->requiredOptions[$this->option->name]);
}
- 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 buildForeignKeys
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function buildForeignKeys() {
foreach ($this->foreignKeys as $data) {
$name = $data[0];
$localColumnNames = $data[1];
$localColumns = 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 processForeignKeys
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function processForeignKeys()
{
/** @var ForeignKey[] $beforeForeignKeys */
$beforeForeignKeys = array();
if (!$this->before->disableForeignKeys) {
- 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 __toString
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function __toString()
{
// http://user:password@host:port/path?query
$result = $this->scheme;
- 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 toArray
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function toArray($skipNotSetProperties = false, $skipCast = false)
{
$result = array();
foreach (static::table()->getColumns(true) as $column) {
$value = $this->{$column->propertyName};
- 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 decodeContent
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function decodeContent($response)
{
if (!empty($this->parsedHeaders['content-encoding'])) {
if ($response && 'gzip' == strtolower($this->parsedHeaders['content-encoding']['value'])) {
if (!function_exists('gzdecode')) {
- 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 processForeignKeys
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function processForeignKeys()
{
/** @var ForeignKey[] $beforeForeignKeys */
$beforeForeignKeys = array();
if (!$this->before->disableForeignKeys) {
- 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"