elephantly/AmpConverterBundle

View on GitHub

Showing 164 of 164 total issues

Function closing brace must go on the next line following the body; found 1 blank lines before brace
Open

    }

Function getDefaultValue has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function getDefaultValue($attribute)
    {
        switch ($attribute) {
            case 'layout':
                return 'responsive';
Severity: Minor
Found in Converter/Social/AmpTwitterConverter.php - About 35 mins to fix

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

The closing brace for the class must go on the next line after the body
Open

}

Function closing brace must go on the next line following the body; found 1 blank lines before brace
Open

    }

The closing brace for the class must go on the next line after the body
Open

}

The closing brace for the class must go on the next line after the body
Open

}

Function callback has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function callback()
    {

        foreach ($this->inputElement->childNodes as $tag) {

Severity: Minor
Found in Converter/Media/AmpAudioConverter.php - About 35 mins to fix

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

The closing brace for the class must go on the next line after the body
Open

}

The closing brace for the class must go on the next line after the body
Open

}

Function closing brace must go on the next line following the body; found 1 blank lines before brace
Open

    }

The closing brace for the class must go on the next line after the body
Open

}

Expected 1 space after FUNCTION keyword; 0 found
Open

Filter::register('kahlan.coverage', function($chain) {
Severity: Minor
Found in kahlan-config.travis.php by phpcodesniffer

Function closing brace must go on the next line following the body; found 1 blank lines before brace
Open

    }

Function closing brace must go on the next line following the body; found 1 blank lines before brace
Open

    }

Function closing brace must go on the next line following the body; found 1 blank lines before brace
Open

    }

Function closing brace must go on the next line following the body; found 1 blank lines before brace
Open

    }

Function closing brace must go on the next line following the body; found 1 blank lines before brace
Open

    }

The closing brace for the class must go on the next line after the body
Open

}

Function closing brace must go on the next line following the body; found 1 blank lines before brace
Open

    }
Severity: Minor
Found in Converter/AmpConverter.php by phpcodesniffer

The closing brace for the class must go on the next line after the body
Open

}
Severity
Category
Status
Source
Language