mambax7/extgallery

View on GitHub

Showing 701 of 9,653 total issues

Function _get_image_details has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    public function _get_image_details($image)
    {
        $data = @getimagesize($image);
        //  1 = GIF,   2 = JPG,  3 = PNG,  4 = SWF,  5 = PSD,  6 = BMP,
        //  7 = TIFF (intel byte order),   8 = TIFF (motorola byte order),
Severity: Minor
Found in class/pear/Image/Transform.php - About 2 hrs 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 PclTarDelete has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    function PclTarDelete($p_tarname, $p_filelist, $p_mode = '')
    {
        TrFctStart(__FILE__, __LINE__, 'PclTarDelete', "tar='$p_tarname', list='$p_filelist', mode='$p_mode'");
        $v_result = 1;

Severity: Minor
Found in class/pcltar.lib.php - About 2 hrs 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 PclTarUpdate has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    function PclTarUpdate($p_tarname, $p_filelist, $p_mode = '', $p_add_dir = '', $p_remove_dir = '')
    {
        TrFctStart(__FILE__, __LINE__, 'PclTarUpdate', "tar='$p_tarname', list='$p_filelist', mode='$p_mode'");
        $v_result = 1;

Severity: Minor
Found in class/pcltar.lib.php - About 2 hrs 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 _createImage has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    public function _createImage($width = -1, $height = -1, $trueColor = null)
    {
        if (-1 == $width) {
            $width = $this->new_x;
        }
Severity: Minor
Found in class/pear/Image/Transform/Driver/GD.php - About 2 hrs 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 PclTarExtractIndex has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    function PclTarExtractIndex($p_tarname, $p_index, $p_path = './', $p_remove_path = '', $p_mode = '')
    {
        TrFctStart(__FILE__, __LINE__, 'PclTarExtractIndex', "tar=$p_tarname, index='$p_index', path=$p_path, remove_path='$p_remove_path', mode='$p_mode'");
        $v_result = 1;

Severity: Minor
Found in class/pcltar.lib.php - About 2 hrs 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 PclTarExtractList has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    function PclTarExtractList($p_tarname, $p_filelist, $p_path = './', $p_remove_path = '', $p_mode = '')
    {
        TrFctStart(__FILE__, __LINE__, 'PclTarExtractList', "tar=$p_tarname, list, path=$p_path, remove_path='$p_remove_path', mode='$p_mode'");
        $v_result = 1;

Severity: Minor
Found in class/pcltar.lib.php - About 2 hrs 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 makeSelect has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    public function makeSelect($cats, $name, $selectMode, $addEmpty, $selected, $extra, $displayWeight)
    {
        $ret = '<select name="' . $name . '" id="' . $name . '"' . $extra . '>';
        if ($addEmpty) {
            $ret .= '<option value="0">-----</option>';
Severity: Minor
Found in class/CategoryHandler.php - About 2 hrs 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 pinchZoom has 56 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    $.fn.TosRUs.pinchZoom = function( $img )
    {
        var _endScale = 1,
            _curScale = 1,
            _oldScale = 1,
Severity: Major
Found in assets/js/TosRUs/src/js/jquery.tosrus.js - About 2 hrs to fix

    Method find has 56 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function find($args)
        {
            if (!is_array($args)) {
                $args = preg_split('/\s+/', $args, -1, PREG_SPLIT_NO_EMPTY);
            }
    Severity: Major
    Found in class/pear/System.php - About 2 hrs to fix

      Method isBlockCloned has 55 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options)
          {
              xoops_loadLanguage('admin', 'system');
              xoops_loadLanguage('admin/blocksadmin', 'system');
              xoops_loadLanguage('admin/groups', 'system');
      Severity: Major
      Found in admin/blocksadmin.php - About 2 hrs to fix

        Method xoops_module_update_extgallery has 55 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function xoops_module_update_extgallery(\XoopsModule $xoopsModule, $oldVersion = null)
        {
            $catHandler = Extgallery\Helper::getInstance()->getHandler('PublicCategory');
            $catHandler->rebuild();
        
        
        Severity: Major
        Found in include/update_function.php - About 2 hrs to fix

          Method doGetopt has 55 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
              {
                  // in case you pass directly readPHPArgv() as the first arg
                  if (PEAR::isError($args)) {
                      return $args;
          Severity: Major
          Found in class/pear/Console/Getopt.php - About 2 hrs to fix

            Method __construct has 55 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function __construct(
                    $message = 'unknown error',
                    $code = null,
                    $mode = null,
                    $options = null,
            Severity: Major
            Found in class/pear/PEAR.php - About 2 hrs to fix

              File metaslide.image.class.php has 258 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              
              /**
               * Generic Slider super class. Extended by library specific classes.
               */
              Severity: Minor
              Found in assets/js/ml-slider/inc/slide/metaslide.image.class.php - About 2 hrs to fix

                PEAR has 21 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class PEAR
                {
                    /**
                     * Whether to enable internal debug messages.
                     *
                Severity: Minor
                Found in class/pear/PEAR.php - About 2 hrs to fix

                  Function Finger has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      var Finger = function(elem, options) {
                  
                          // default options
                          this.config = {
                              start: 0,
                  Severity: Major
                  Found in assets/js/galleria/galleria-1.3.5.js - About 2 hrs to fix

                    Function Finger has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        var Finger = function(elem, options) {
                    
                            // default options
                            this.config = {
                                start: 0,
                    Severity: Major
                    Found in assets/js/galleria/galleria-1.3.3.js - About 2 hrs to fix

                      Function _initSlidesFromContent has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function _initSlidesFromContent( $tos, $anchors, $wrpr, $sldr, opts )
                          {
                              $tos.children().each(
                                  function( index )
                                  {
                      Severity: Major
                      Found in assets/js/TosRUs/src/js/jquery.tosrus.js - About 2 hrs to fix

                        Function close has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            $.fancybox.close = function() {
                                if (busy || wrap.is(':hidden')) {
                                    return;
                                }
                        
                        
                        Severity: Major
                        Found in assets/js/fancybox/fancybox.js - About 2 hrs to fix

                          Method extgalleryList has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function extgalleryList($options)
                          {
                              global $xoopsConfig;
                          
                              /** @var Extgallery\PhotoHandler $photoHandler */
                          Severity: Major
                          Found in blocks/extgallery_blocks.php - About 2 hrs to fix
                            Severity
                            Category
                            Status
                            Source
                            Language