third_party/MX/Controller.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using undefined variables such as '$registry' which will lead to PHP notices.
Open

        Modules::$registry[strtolower($class)] = $this;
Severity: Minor
Found in third_party/MX/Controller.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Call to undeclared function \load_class()
Open

        $this->load = clone load_class('Loader');
Severity: Critical
Found in third_party/MX/Controller.php by phan

Reference to undeclared property \MX_Controller->load
Open

        $this->load = clone load_class('Loader');
Severity: Minor
Found in third_party/MX/Controller.php by phan

Saw unextractable annotation for comment '* @param [type] $class [description]'
Open

     * @param  [type] $class [description]
Severity: Info
Found in third_party/MX/Controller.php by phan

Call to undeclared function \log_message()
Open

        log_message('debug', $class.' MX_Controller Initialized');
Severity: Critical
Found in third_party/MX/Controller.php by phan

The phpdoc comment for @method cannot occur on a method
Open

     * @method __get
Severity: Info
Found in third_party/MX/Controller.php by phan

The phpdoc comment for @method cannot occur on a method
Open

     * @method __construct
Severity: Info
Found in third_party/MX/Controller.php by phan

Saw unextractable annotation for comment '* @return [type] [description]'
Open

     * @return [type]        [description]
Severity: Info
Found in third_party/MX/Controller.php by phan

Saw unextractable annotation for comment '* @method __construct'
Open

     * @method __construct
Severity: Info
Found in third_party/MX/Controller.php by phan

Reference to undeclared property \CI->config
Open

        $class = str_replace(CI::$APP->config->item('controller_suffix'), '', get_class($this));
Severity: Minor
Found in third_party/MX/Controller.php by phan

Saw unextractable annotation for comment '* @method __get'
Open

     * @method __get
Severity: Info
Found in third_party/MX/Controller.php by phan

Each class must be in a namespace of at least one level (a top-level vendor name)
Open

class MX_Controller

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 39 and the first side effect is on line 1.
Open

<?php defined('BASEPATH') or exit('No direct script access allowed');

The class MX_Controller is not named in CamelCase.
Open

class MX_Controller
{
    public $autoload = [];

    /**
Severity: Minor
Found in third_party/MX/Controller.php by phpmd

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

Class name "MX_Controller" is not in camel caps format
Open

class MX_Controller

There are no issues that match your filters.

Category
Status