jobyone/glueframework

View on GitHub

Showing 6 of 46 total issues

Method query has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function query($options, $values)
    {
        $class = get_called_class();
        $defaults = array(
            'where'=>false,
Severity: Minor
Found in _glue/classes/glueExtras/CRUDder/CRUDder.php - About 1 hr to fix

    Function glue_load_routes has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

    function glue_load_routes()
    {
        //routes consist of Route/routes with Route/system appended
        $routes = Conf::get('Route/routes');
        $sysroutes = array_reverse(Conf::get('Route/system'));
    Severity: Minor
    Found in _glue/classes/glue/Route.php - About 45 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

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

    function glue_autoload($class)
    {
        $paths = array();
        $paths[] = SITE_PATH . '/classes';
        $paths[] = GLUE_PATH . '/classes';
    Severity: Minor
    Found in _glue/autoload.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

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

        protected static function findFileForRoute($uri, $dir, $extensions)
        {
            if ($uri == '/') {
                $uri = '';
            }
    Severity: Minor
    Found in _glue/classes/glueExtras/RouteTools.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

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

        public static function query($options, $values)
        {
            $class = get_called_class();
            $defaults = array(
                'where'=>false,
    Severity: Minor
    Found in _glue/classes/glueExtras/CRUDder/CRUDder.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

    Function update has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

        public function update()
        {
            if (count($this->dataChanged) === 0 || $this->deleted) {
                return;
            }
    Severity: Minor
    Found in _glue/classes/glueExtras/CRUDder/CRUDder.php - About 25 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

    Severity
    Category
    Status
    Source
    Language