Function serve
has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring. Open
public static function serve($controller, $options = array())
{
if (! self::$isDocRootSet && 0 === stripos(PHP_OS, 'win')) {
self::setDocRoot();
}
- 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 serve
has 155 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function serve($controller, $options = array())
{
if (! self::$isDocRootSet && 0 === stripos(PHP_OS, 'win')) {
self::setDocRoot();
}
File Minify.php
has 333 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Class Minify
* @package Minify
*/
Method _combineMinify
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected static function _combineMinify()
{
$type = self::$_options['contentType']; // ease readability
// when combining scripts, make sure all statements separated and
Function _combineMinify
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected static function _combineMinify()
{
$type = self::$_options['contentType']; // ease readability
// when combining scripts, make sure all statements separated and
- 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 _handleCssImports
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected static function _handleCssImports($css)
{
if (self::$_options['bubbleCssImports']) {
// bubble CSS imports
preg_match_all('/@import.*?;/', $css, $imports);
- 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"