Showing 651 of 651 total issues

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

                    case 4: $_route = ($this->located == 3) ? $class.'/'.$method : $method.'/index';
Severity: Minor
Found in third_party/MX/Router.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

Method load has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function load($file = '', $use_sections = false, $fail_gracefully = false, $_module = '')
    {
        if (in_array($file, $this->is_loaded, true)) {
            return $this->item($file);
        }
Severity: Minor
Found in third_party/MX/Config.php - About 1 hr to fix

    Method model has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function model($model, $object_name = null, $connect = false)
        {
            if (is_array($model)) {
                return $this->models($model);
            }
    Severity: Minor
    Found in third_party/MX/Loader.php - About 1 hr to fix

      Method load has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function load($module)
          {
              // Backward function
              // The function each() has been DEPRECATED as of PHP 7.2.0. Relying on this function is highly discouraged
              // Before PHP 7.1.0, list() only worked on numerical arrays and assumes the numerical indices start at 0.
      Severity: Minor
      Found in third_party/MX/Modules.php - About 1 hr to fix

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

        class MX_Config extends CI_Config
        Severity: Minor
        Found in third_party/MX/Config.php by phpcodesniffer

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

        class MX_Lang extends CI_Lang
        Severity: Minor
        Found in third_party/MX/Lang.php by phpcodesniffer

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

        class CI
        Severity: Minor
        Found in third_party/MX/Ci.php by phpcodesniffer

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

        class MX_Controller

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

        class CI extends CI_Controller
        Severity: Minor
        Found in third_party/MX/Base.php by phpcodesniffer

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

        class MX_Loader extends CI_Loader
        Severity: Minor
        Found in third_party/MX/Loader.php by phpcodesniffer

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

        class MX_Router extends CI_Router
        Severity: Minor
        Found in third_party/MX/Router.php by phpcodesniffer

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

        class MY_Router extends MX_Router
        Severity: Minor
        Found in core/MY_Router.php by phpcodesniffer

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

        class Modules
        Severity: Minor
        Found in third_party/MX/Modules.php by phpcodesniffer

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

        class MY_Loader extends MX_Loader
        Severity: Minor
        Found in core/MY_Loader.php by phpcodesniffer

        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 36 and the first side effect is on line 1.
        Open

        <?php defined('BASEPATH') or exit('No direct script access allowed');
        Severity: Minor
        Found in third_party/MX/Lang.php by phpcodesniffer

        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 36 and the first side effect is on line 1.
        Open

        <?php defined('BASEPATH') or exit('No direct script access allowed');
        Severity: Minor
        Found in third_party/MX/Loader.php by phpcodesniffer

        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');
        Severity: Minor
        Found in third_party/MX/Ci.php by phpcodesniffer

        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 36 and the first side effect is on line 1.
        Open

        <?php defined('BASEPATH') or exit('No direct script access allowed');
        Severity: Minor
        Found in third_party/MX/Config.php by phpcodesniffer

        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 40 and the first side effect is on line 1.
        Open

        <?php defined('BASEPATH') or exit('No direct script access allowed');
        Severity: Minor
        Found in third_party/MX/Base.php by phpcodesniffer

        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');
        Severity
        Category
        Status
        Source
        Language