mambax7/extgallery

View on GitHub

Showing 701 of 9,653 total issues

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

        $id = 0,
        $includeSelf = false,
        $childrenOnly = false,
        $withRestrict = true,
        $permType = 'public_access'
Severity: Minor
Found in class/CategoryHandler.php - About 35 mins to fix

    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

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

          public function __construct(\XoopsDatabase $db, $table, $idField, $parentField, $sortField)
      Severity: Minor
      Found in class/NestedTree.php - About 35 mins to fix

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

        function toggle(id) {
            if (document.getElementById) {
                obj = document.getElementById(id);
            }
            if (document.all) {
        Severity: Minor
        Found in assets/js/admin.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 admin_process has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            public function admin_process()
            {
                // this function should only ever be called from the Meta Slider admin page.
                if (!is_admin()) {
                    return;
        Severity: Minor
        Found in assets/js/ml-slider/ml-slider.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 admin_footer has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            public function admin_footer()
            {
                global $pagenow;
        
                // Only run in post/page creation and edit screens
        Severity: Minor
        Found in assets/js/ml-slider/ml-slider.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 parse has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            public function parse($text)
            {
                # removes \r characters
                $text = str_replace("\r\n", "\n", $text);
                $text = str_replace("\r", "\n", $text);

        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 form has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            public function form($instance)
            {
                $selected_slider = 0;
                $title           = '';
                $sliders         = false;
        Severity: Minor
        Found in assets/js/ml-slider/inc/metaslider.widget.class.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 save has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            public function save($filename, $type = '', $quality = null)
            {
                $options = is_array($quality) ? $quality : [];
                if (is_numeric($quality)) {
                    $options['quality'] = $quality;
        Severity: Minor
        Found in class/pear/Image/Transform/Driver/Imagick3.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 checkImageLibrary has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            private function checkImageLibrary()
            {
                if (isset($this->options['imageLibrary']) && false === $this->options['imageLibrary']) {
                    return;
                }
        Severity: Minor
        Found in assets/js/ml-slider/inc/metaslider.systemcheck.class.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 delExpect has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            public function delExpect($error_code)
            {
                $deleted = false;
                if ((is_array($error_code) && (0 != count($error_code)))) {
                    // $error_code is a non-empty array here; we walk through it trying
        Severity: Minor
        Found in class/pear/PEAR.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 TrFctStart has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            function TrFctStart($p_file, $p_line, $p_name, $p_param = '', $p_message = '')
            {
                global $g_pcl_trace_level;
                global $g_pcl_trace_mode;
                global $g_pcl_trace_filename;
        Severity: Minor
        Found in class/pcltrace.lib.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 deleteById has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            public function deleteById($id, $force = false)
            {
                if (\is_array($this->keyName)) {
                    $clause = [];
                    for ($i = 0, $iMax = \count($this->keyName); $i < $iMax; ++$i) {
        Severity: Minor
        Found in class/PersistableObjectHandler.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 triggerEvent has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            public function triggerEvent($event, &$param)
            {
                require XOOPS_ROOT_PATH . '/modules/extgallery/plugin/plugin.php';
                if (is_iterable($extgalleryPlugin)) {
                    foreach ($extgalleryPlugin as $plugin => $status) {
        Severity: Minor
        Found in class/PluginHandler.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 TrFctEnd has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            function TrFctEnd($p_file, $p_line, $p_return = 1, $p_message = '')
            {
                global $g_pcl_trace_level;
                global $g_pcl_trace_mode;
                global $g_pcl_trace_filename;
        Severity: Minor
        Found in class/pcltrace.lib.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

        Avoid too many return statements within this function.
        Open

                        return this;
        Severity: Major
        Found in assets/js/galleriffic/jquery.galleriffic.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                          return true;
          Severity: Major
          Found in assets/js/magnific_popup/jquery.magnific-popup.js - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                            return new MetaFlexSlider($id, $shortcode_settings);
            Severity: Major
            Found in assets/js/ml-slider/ml-slider.php - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return false;
              Severity: Major
              Found in assets/js/magnific_popup/jquery.magnific-popup.js - About 30 mins to fix
                Severity
                Category
                Status
                Source
                Language