mambax7/extgallery

View on GitHub
include/oninstall.php

Summary

Maintainability
A
1 hr
Test Coverage

xoops_module_pre_install_extgallery accesses the super-global variable $GLOBALS.
Open

function xoops_module_pre_install_extgallery(\XoopsModule $module)
{
    require_once __DIR__ . '/common.php';
    /** @var Extgallery\Utility $utility */
    $utility = new Utility();
Severity: Minor
Found in include/oninstall.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

xoops_module_pre_install_extgallery accesses the super-global variable $GLOBALS.
Open

function xoops_module_pre_install_extgallery(\XoopsModule $module)
{
    require_once __DIR__ . '/common.php';
    /** @var Extgallery\Utility $utility */
    $utility = new Utility();
Severity: Minor
Found in include/oninstall.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

Method xoops_module_install_extgallery has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function xoops_module_install_extgallery(\XoopsModule $module)
{
    require_once \dirname(__DIR__) . '/preloads/autoloader.php';

    $moduleDirName = \basename(\dirname(__DIR__));
Severity: Minor
Found in include/oninstall.php - About 1 hr to fix

    Avoid unused local variables such as '$moduleDirName'.
    Open

        $moduleDirName = \basename(\dirname(__DIR__));
    Severity: Minor
    Found in include/oninstall.php by phpmd

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    Avoid unused local variables such as '$configHandler'.
    Open

        $configHandler = xoops_getHandler('config');
    Severity: Minor
    Found in include/oninstall.php by phpmd

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    The variable $module_id is not named in camelCase.
    Open

    function xoops_module_install_extgallery(\XoopsModule $module)
    {
        require_once \dirname(__DIR__) . '/preloads/autoloader.php';
    
        $moduleDirName = \basename(\dirname(__DIR__));
    Severity: Minor
    Found in include/oninstall.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $module_id is not named in camelCase.
    Open

    function xoops_module_install_extgallery(\XoopsModule $module)
    {
        require_once \dirname(__DIR__) . '/preloads/autoloader.php';
    
        $moduleDirName = \basename(\dirname(__DIR__));
    Severity: Minor
    Found in include/oninstall.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $module_id is not named in camelCase.
    Open

    function xoops_module_install_extgallery(\XoopsModule $module)
    {
        require_once \dirname(__DIR__) . '/preloads/autoloader.php';
    
        $moduleDirName = \basename(\dirname(__DIR__));
    Severity: Minor
    Found in include/oninstall.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $module_id is not named in camelCase.
    Open

    function xoops_module_install_extgallery(\XoopsModule $module)
    {
        require_once \dirname(__DIR__) . '/preloads/autoloader.php';
    
        $moduleDirName = \basename(\dirname(__DIR__));
    Severity: Minor
    Found in include/oninstall.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $module_id is not named in camelCase.
    Open

    function xoops_module_install_extgallery(\XoopsModule $module)
    {
        require_once \dirname(__DIR__) . '/preloads/autoloader.php';
    
        $moduleDirName = \basename(\dirname(__DIR__));
    Severity: Minor
    Found in include/oninstall.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $module_id is not named in camelCase.
    Open

    function xoops_module_install_extgallery(\XoopsModule $module)
    {
        require_once \dirname(__DIR__) . '/preloads/autoloader.php';
    
        $moduleDirName = \basename(\dirname(__DIR__));
    Severity: Minor
    Found in include/oninstall.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $module_id is not named in camelCase.
    Open

    function xoops_module_install_extgallery(\XoopsModule $module)
    {
        require_once \dirname(__DIR__) . '/preloads/autoloader.php';
    
        $moduleDirName = \basename(\dirname(__DIR__));
    Severity: Minor
    Found in include/oninstall.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $module_id is not named in camelCase.
    Open

    function xoops_module_install_extgallery(\XoopsModule $module)
    {
        require_once \dirname(__DIR__) . '/preloads/autoloader.php';
    
        $moduleDirName = \basename(\dirname(__DIR__));
    Severity: Minor
    Found in include/oninstall.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $module_id is not named in camelCase.
    Open

    function xoops_module_install_extgallery(\XoopsModule $module)
    {
        require_once \dirname(__DIR__) . '/preloads/autoloader.php';
    
        $moduleDirName = \basename(\dirname(__DIR__));
    Severity: Minor
    Found in include/oninstall.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $module_id is not named in camelCase.
    Open

    function xoops_module_install_extgallery(\XoopsModule $module)
    {
        require_once \dirname(__DIR__) . '/preloads/autoloader.php';
    
        $moduleDirName = \basename(\dirname(__DIR__));
    Severity: Minor
    Found in include/oninstall.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $module_id is not named in camelCase.
    Open

    function xoops_module_install_extgallery(\XoopsModule $module)
    {
        require_once \dirname(__DIR__) . '/preloads/autoloader.php';
    
        $moduleDirName = \basename(\dirname(__DIR__));
    Severity: Minor
    Found in include/oninstall.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $module_id is not named in camelCase.
    Open

    function xoops_module_install_extgallery(\XoopsModule $module)
    {
        require_once \dirname(__DIR__) . '/preloads/autoloader.php';
    
        $moduleDirName = \basename(\dirname(__DIR__));
    Severity: Minor
    Found in include/oninstall.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $module_id is not named in camelCase.
    Open

    function xoops_module_install_extgallery(\XoopsModule $module)
    {
        require_once \dirname(__DIR__) . '/preloads/autoloader.php';
    
        $moduleDirName = \basename(\dirname(__DIR__));
    Severity: Minor
    Found in include/oninstall.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $module_id is not named in camelCase.
    Open

    function xoops_module_install_extgallery(\XoopsModule $module)
    {
        require_once \dirname(__DIR__) . '/preloads/autoloader.php';
    
        $moduleDirName = \basename(\dirname(__DIR__));
    Severity: Minor
    Found in include/oninstall.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $module_id is not named in camelCase.
    Open

    function xoops_module_install_extgallery(\XoopsModule $module)
    {
        require_once \dirname(__DIR__) . '/preloads/autoloader.php';
    
        $moduleDirName = \basename(\dirname(__DIR__));
    Severity: Minor
    Found in include/oninstall.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $module_id is not named in camelCase.
    Open

    function xoops_module_install_extgallery(\XoopsModule $module)
    {
        require_once \dirname(__DIR__) . '/preloads/autoloader.php';
    
        $moduleDirName = \basename(\dirname(__DIR__));
    Severity: Minor
    Found in include/oninstall.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $module_id is not named in camelCase.
    Open

    function xoops_module_install_extgallery(\XoopsModule $module)
    {
        require_once \dirname(__DIR__) . '/preloads/autoloader.php';
    
        $moduleDirName = \basename(\dirname(__DIR__));
    Severity: Minor
    Found in include/oninstall.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $module_id is not named in camelCase.
    Open

    function xoops_module_install_extgallery(\XoopsModule $module)
    {
        require_once \dirname(__DIR__) . '/preloads/autoloader.php';
    
        $moduleDirName = \basename(\dirname(__DIR__));
    Severity: Minor
    Found in include/oninstall.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $module_id is not named in camelCase.
    Open

    function xoops_module_install_extgallery(\XoopsModule $module)
    {
        require_once \dirname(__DIR__) . '/preloads/autoloader.php';
    
        $moduleDirName = \basename(\dirname(__DIR__));
    Severity: Minor
    Found in include/oninstall.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $module_id is not named in camelCase.
    Open

    function xoops_module_install_extgallery(\XoopsModule $module)
    {
        require_once \dirname(__DIR__) . '/preloads/autoloader.php';
    
        $moduleDirName = \basename(\dirname(__DIR__));
    Severity: Minor
    Found in include/oninstall.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $module_id is not named in camelCase.
    Open

    function xoops_module_install_extgallery(\XoopsModule $module)
    {
        require_once \dirname(__DIR__) . '/preloads/autoloader.php';
    
        $moduleDirName = \basename(\dirname(__DIR__));
    Severity: Minor
    Found in include/oninstall.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $module_id is not named in camelCase.
    Open

    function xoops_module_install_extgallery(\XoopsModule $module)
    {
        require_once \dirname(__DIR__) . '/preloads/autoloader.php';
    
        $moduleDirName = \basename(\dirname(__DIR__));
    Severity: Minor
    Found in include/oninstall.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    There are no issues that match your filters.

    Category
    Status