XoopsModules25x/lexikon

View on GitHub

Showing 216 of 316 total issues

Method truncateHtml has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public static function truncateHtml($text, $length = 100, $ending = '...', $exact = false, $considerHtml = true)
Severity: Minor
Found in class/Utility.php - About 35 mins to fix

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

    function lx_importMenu($currentoption = 0, $breadcrumb = '')
    {
        global $cf;
        echo "<table style='border:0; width:99%;'>
                  <tr><td style='vertical-align:top;'>
    Severity: Minor
    Found in admin/functions.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

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

    function ddrivetip(thetext, thewidth, thecolor) {
        if (ns6 || ie) {
            if (typeof thewidth != "undefined") tipobj.style.width = thewidth + "px";
            if (typeof thecolor != "undefined" && thecolor != "") tipobj.style.backgroundColor = thecolor;
            tipobj.innerHTML = thetext;
    Severity: Minor
    Found in assets/js/tooltipscript2.js - 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

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

    function b_lxentries_alpha_show($options)
    {
        global $xoopsDB, $xoopsUser, $xoopsModule;
        $myts = \MyTextSanitizer::getInstance();
    
    
    Severity: Minor
    Found in blocks/entries_initial.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

    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           = [];
    Severity: Minor
    Found in class/Utility.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

    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

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

        public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = [])
        {
            $tree .= $prefix . '<input type="checkbox" name="' . $this->getName() . '[groups][' . $this->_groupId . '][' . $option['id'] . ']" id="' . $this->getName() . '[groups][' . $this->_groupId . '][' . $option['id'] . ']" onclick="';
            // If there are parent elements, add javascript that will
            // make them selecteded when this element is checked to make
    Severity: Minor
    Found in class/GroupFormCheckBox.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

    Function lx_showSearchForm has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    function lx_showSearchForm()
    {
        global $xoopsUser, $xoopsDB, $xoopsModule, $xoopsModuleConfig, $xoopsConfig;
        /** @var \XoopsGroupPermHandler $grouppermHandler */
        $grouppermHandler = xoops_getHandler('groupperm');
    Severity: Minor
    Found in include/functions.php - About 25 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

    Function lx_getHTMLHighlight has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    function lx_getHTMLHighlight($needle, $haystack, $hlS, $hlE)
    {
        $parts = explode('>', $haystack);
        foreach ($parts as $key => $part) {
            $pL = '';
    Severity: Minor
    Found in include/functions.php - About 25 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

    Function loadSampleData has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    function loadSampleData()
    {
        global $xoopsConfig;
        $moduleDirName      = \basename(\dirname(__DIR__));
        $moduleDirNameUpper = mb_strtoupper($moduleDirName);
    Severity: Minor
    Found in testdata/index.php - About 25 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

    Function convertIPAddresses has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

        private function convertIPAddresses($tableName, $columnName)
        {
            if ($this->tableHandler->useTable($tableName)) {
                $attributes = $this->tableHandler->getColumnAttributes($tableName, $columnName);
                if (false !== mb_strpos($attributes, ' int(')) {
    Severity: Minor
    Found in class/Common/Migrate.php - About 25 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

    Function categoryDelete has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    function categoryDelete($categoryID = '')
    {
        //global $xoopsDB, $xoopsConfig;
        global $xoopsConfig, $xoopsDB, $xoopsModule;
        $idc = Request::getInt('categoryID', '');
    Severity: Minor
    Found in admin/category.php - About 25 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

    Function __construct has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

        public function __construct($target)
        {
            $db      = \XoopsDatabaseFactory::getDatabaseConnection();
            $helper  = Helper::getInstance();
            $utility = new Utility();
    Severity: Minor
    Found in class/Form/EntriesForm.php - About 25 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

    Function getFormSearch has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function getFormSearch($type = '3', $categoryID = '0', $term = '')
        {
            global $xoopsUser, $xoopsDB, $xoopsModule, $xoopsConfig;
    
            $helper = Helper::getInstance();
    Severity: Minor
    Found in class/Utility.php - About 25 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

    Function getFormFilter has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getFormFilter()
        {
            global $xoopsUser, $xoopsDB, $xoopsModule, $xoopsConfig;
    
            $helper = Helper::getInstance();
    Severity: Minor
    Found in class/Entries.php - About 25 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

    Function getHTMLHighlight has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function getHTMLHighlight($needle, $haystack, $hlS, $hlE)
        {
            $parts = \explode('>', $haystack);
            foreach ($parts as $key => $part) {
                $pL = '';
    Severity: Minor
    Found in class/Utility.php - About 25 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

    Severity
    Category
    Status
    Source
    Language