XoopsModules25x/xlanguage

View on GitHub

Showing 589 of 589 total issues

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

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

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

use XoopsModules\Xlanguage;
Severity: Minor
Found in admin/menu.php by phpcodesniffer

There must be one USE keyword per declaration
Open

use XoopsModules\Xlanguage\{Common\Configurator,
Severity: Minor
Found in include/oninstall.php by phpcodesniffer

There must be one USE keyword per declaration
Open

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

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

    public static function getEditor($helper = null, $options = null)
    {
        if (null === $options) {
            $options           = [];
            $options['name']   = 'Editor';
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

There must be one USE keyword per declaration
Open

use XoopsModules\Xlanguage\{Helper,
Severity: Minor
Found in admin/main.php by phpcodesniffer

There must be one USE keyword per declaration
Open

use XoopsModules\Xlanguage\{
Severity: Minor
Found in testdata/index.php by phpcodesniffer

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

use XoopsModules\Xlanguage\Helper;

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

use XoopsObject;
Severity: Minor
Found in class/Blanguage.php by phpcodesniffer

There must be one USE keyword per declaration
Open

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

Blank line found at end of control structure
Open


Severity: Minor
Found in api.php by phpcodesniffer

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

use XoopsModules\Xlanguage;
Severity: Minor
Found in class/Language.php by phpcodesniffer

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

use XoopsObjectHandler;
Severity: Minor
Found in class/LanguageHandler.php by phpcodesniffer

There must be one USE keyword per declaration
Open

use XoopsModules\Xlanguage\{Common
Severity: Minor
Found in class/Utility.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

There must be one USE keyword per declaration
Open

use XoopsModules\Xlanguage\{
Severity: Minor
Found in api.php by phpcodesniffer

There must be one USE keyword per declaration
Open

use XoopsModules\Xlanguage\{Helper,
Severity: Minor
Found in blocks/xlanguage_blocks.php by phpcodesniffer

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

}

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

use XoopsDatabaseFactory;
Severity: Minor
Found in class/Helper.php by phpcodesniffer

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

use XoopsModule;
Severity
Category
Status
Source
Language