XoopsModules25x/about

View on GitHub

Showing 434 of 434 total issues

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

    public static function getEditor($helper = null, $options = null)
    {
        /** @var Helper $helper */
        if (null === $options) {
            $options           = [];
Severity: Minor
Found in class/Common/SysUtility.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

The closing brace for the interface must go on the next line after the body
Open

}
Severity: Minor
Found in class/Constants.php by phpcodesniffer

There must be one USE keyword per declaration
Open

use XoopsModules\About\{
Severity: Minor
Found in include/oninstall.php by phpcodesniffer

There must be one USE keyword per declaration
Open

use XoopsModules\About\{
Severity: Minor
Found in include/onuninstall.php by phpcodesniffer

The closing brace for the class must go on the next line after the body
Open

}
Severity: Minor
Found in class/Utility.php by phpcodesniffer

There must be one blank line after the last USE statement; 0 found;
Open

use XoopsModules\About\PageHandler;
Severity: Minor
Found in include/form.page.php by phpcodesniffer

Expected 1 blank line at end of file; 2 found
Open

];
Severity: Minor
Found in config/icons.php by phpcodesniffer

Scope keyword "public" must be followed by a single space
Open

    public  $dirname;
Severity: Minor
Found in class/Common/Breadcrumb.php by phpcodesniffer

Expected 1 blank line at end of file; 2 found
Open

];
Severity: Minor
Found in include/config.php by phpcodesniffer

There must be one blank line after the namespace declaration
Open

namespace XoopsModules\About;
Severity: Minor
Found in class/Tree.php by phpcodesniffer

There must be one blank line after the last USE statement; 3 found;
Open

use XoopsModules\About\Helper;
Severity: Minor
Found in class/Common/SysUtility.php by phpcodesniffer

Expected 1 blank line at end of file; 2 found
Open

];
Severity: Minor
Found in config/paths.php by phpcodesniffer

There must be a single space after the USE keyword
Open

use  Xmf\Module\Admin;
Severity: Minor
Found in admin/admin.page.php by phpcodesniffer

There must be one USE keyword per declaration
Open

use XoopsModules\About\{
Severity: Minor
Found in include/onupdate.php by phpcodesniffer

Method name "Utility::template_lookup" is not in camel caps format
Open

    public static function &template_lookup($index_by_page = false)
Severity: Minor
Found in class/Utility.php by phpcodesniffer

Expected 1 blank line at end of file; 2 found
Open

];
Severity: Minor
Found in config/config.php by phpcodesniffer

There must be one blank line after the last USE statement; 0 found;
Open

use XoopsModules\About\PageHandler;
Severity: Minor
Found in admin/admin.page.php by phpcodesniffer

There must be one blank line after the last USE statement; 0 found;
Open

use XoopsModules\About\Helper;
Severity: Minor
Found in admin/admin_header.php by phpcodesniffer

Missing class import via use statement (line '56', column '24').
Open

        $dirInfo = new \SplFileInfo($old_dir);
Severity: Minor
Found in include/onuninstall.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '170', column '24').
Open

        $dirInfo = new \SplFileInfo($old_dir);
Severity: Minor
Found in include/action.module.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Severity
Category
Status
Source
Language