mambax7/extgallery

View on GitHub

Showing 701 of 9,653 total issues

Function hide has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            hide : function( elem, speed, callback ) {

                callback = callback || F;

                var $elem = $(elem);
Severity: Minor
Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

    Function fancybox has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        $.fn.fancybox = function(options) {
            if (!$(this).length) {
                return this;
            }
    
    
    Severity: Minor
    Found in assets/js/fancybox/fancybox.js - About 1 hr to fix

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

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

        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

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

              function PclTarAddList($p_tarname, $p_filelist, $p_add_dir = '', $p_remove_dir = '', $p_mode = '')
              {
                  TrFctStart(__FILE__, __LINE__, 'PclTarAddList', "tar=$p_tarname, file=$p_filelist, p_add_dir='$p_add_dir', p_remove_dir='$p_remove_dir', mode=$p_mode");
                  $v_result      = 1;
                  $p_list_detail = [];
          Severity: Minor
          Found in class/pcltar.lib.php - About 1 hr to fix

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

            function extgallery_tag_synchronization($mid)
            {
                global $XoopsDB;
                /** @var Extgallery\PublicPhotoHandler $itemHandler */
                $itemHandler = Extgallery\Helper::getInstance()->getHandler('PublicPhoto');
            Severity: Minor
            Found in class/plugins/plugin.tag.php - About 1 hr to fix

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

                  public static function getModuleOption($option)
                  {
                      global $xoopsModule;
                      /** @var \XoopsModules\Extgallery\Helper $helper */
                      $helper = \XoopsModules\Extgallery\Helper::getInstance();
              Severity: Minor
              Found in class/Utility.php - About 1 hr to fix

                Method PclTarHandleExtractByIndex has 8 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        $p_tar,
                        &$p_index_current,
                        $p_index_start,
                        $p_index_stop,
                        &$p_list_detail,
                Severity: Major
                Found in class/pcltar.lib.php - About 1 hr to fix

                  Method gal_getWysiwygForm has 8 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  function gal_getWysiwygForm($caption, $name, $value, $rows, $cols, $width, $height, $supplemental)
                  Severity: Major
                  Found in include/functions0.php - About 1 hr to fix

                    Method _raiseError has 8 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            $object,
                            $message = null,
                            $code = null,
                            $mode = null,
                            $options = null,
                    Severity: Major
                    Found in class/pear/PEAR.php - About 1 hr to fix

                      Method getWysiwygForm has 8 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          public static function getWysiwygForm($caption, $name, $value, $rows, $cols, $width, $height, $supplemental)
                      Severity: Major
                      Found in class/Utility.php - About 1 hr to fix

                        Function xoops_module_pre_install_extgallery has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function xoops_module_pre_install_extgallery(\XoopsModule $module)
                        {
                            // Check if this XOOPS version is supported
                            $minSupportedVersion = explode('.', '2.5.0');
                            $currentVersion      = explode('.', mb_substr(XOOPS_VERSION, 6));
                        Severity: Minor
                        Found in include/install_function.php - About 55 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 recurseCopy has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public static function recurseCopy($src, $dst)
                            {
                                $dir = \opendir($src);
                                //        @mkdir($dst);
                                if (!@\mkdir($dst) && !\is_dir($dst)) {
                        Severity: Minor
                        Found in class/Common/FilesManagement.php - About 55 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 compareVersion has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function compareVersion($v1, $v2)
                        {
                            $v1 = explode('.', $v1);
                            $v2 = explode('.', $v2);
                        
                        
                        Severity: Minor
                        Found in admin/moduleUpdateFunction.php - About 55 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 rcopy has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public static function rcopy($src, $dest)
                            {
                                // Only continue if user is a 'global' Admin
                                if (!($GLOBALS['xoopsUser'] instanceof \XoopsUser) || !$GLOBALS['xoopsUser']->isAdmin()) {
                                    return false;
                        Severity: Minor
                        Found in class/Common/FilesManagement.php - About 55 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 populate_slides has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                            private function populate_slides()
                            {
                                $slides = [];
                        
                                $query = $this->get_slides();
                        Severity: Minor
                        Found in assets/js/ml-slider/inc/slider/metaslider.class.php - About 55 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 PclTarList has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                            function PclTarList($p_tarname, $p_mode = '')
                            {
                                TrFctStart(__FILE__, __LINE__, 'PclTarList', "tar=$p_tarname, mode='$p_mode'");
                                $v_result = 1;
                        
                        
                        Severity: Minor
                        Found in class/pcltar.lib.php - About 55 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 rmove has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public static function rmove($src, $dest)
                            {
                                // Only continue if user is a 'global' Admin
                                if (!($GLOBALS['xoopsUser'] instanceof \XoopsUser) || !$GLOBALS['xoopsUser']->isAdmin()) {
                                    return false;
                        Severity: Minor
                        Found in class/Common/FilesManagement.php - About 55 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 PclTarExtract has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                            function PclTarExtract($p_tarname, $p_path = './', $p_remove_path = '', $p_mode = '')
                            {
                                TrFctStart(__FILE__, __LINE__, 'PclTarExtract', "tar='$p_tarname', path='$p_path', remove_path='$p_remove_path', mode='$p_mode'");
                                $v_result = 1;
                        
                        
                        Severity: Minor
                        Found in class/pcltar.lib.php - About 55 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 getSearchedPhoto has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function getSearchedPhoto($queryArray, $condition, $limit, $start, $userId)
                            {
                                $criteria = new CriteriaCompo();
                                if ($userId > 0) {
                                    $criteria->add(new Criteria('uid', $userId));
                        Severity: Minor
                        Found in class/PhotoHandler.php - About 55 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