mambax7/extgallery

View on GitHub

Showing 701 of 9,653 total issues

Function rescale has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    rescale : function( width, height, complete ) {

        var self = this;

        // allow rescale(fn)
Severity: Minor
Found in assets/js/galleria/galleria-1.3.3.js - About 1 hr to fix

    Function bind has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            bind: function( elem, value ) {
    
                if (! tooltip.initialized ) {
                    tooltip.init();
                }
    Severity: Minor
    Found in assets/js/galleria/galleria-1.1.js - About 1 hr to fix

      Function _parseMarkup has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _parseMarkup: function(template, values, item) {
              var arr;
              if(item.data) {
                  values = $.extend(item.data, values);
              }
      Severity: Minor
      Found in assets/js/magnific_popup/jquery.magnific-popup.js - About 1 hr to fix

        Method convertResultSet has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function convertResultSet($result, $id_as_key = false, $as_object = true)
            {
                $trace = \debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 1);
                \trigger_error(__CLASS__ . '::' . __FUNCTION__ . '() is deprecated.' . ". Called from {$trace[0]['file']}line {$trace[0]['line']}", \E_USER_WARNING);
                $ret = [];
        Severity: Minor
        Found in class/ModelReadIterator.php - About 1 hr to fix

          Method convertorderbytrans has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function convertorderbytrans($SortbyOrderby)
          {
              $orderbyTrans = [];
              if ('photo_date DESC' === $SortbyOrderby) {
                  $orderbyTrans = _MD_EXTGALLERY_ORDERBY_DATEASC;
          Severity: Minor
          Found in public-album.php - About 1 hr to fix

            Method convertorderbytrans has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function convertorderbytrans($SortbyOrderby)
            {
                $orderbyTrans = [];
                if ('photo_date DESC' === $SortbyOrderby) {
                    $orderbyTrans = _MD_EXTGALLERY_ORDERBY_DATEASC;
            Severity: Minor
            Found in public-useralbum.php - About 1 hr to fix

              Method rm has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static function rm($args)
                  {
                      $opts = self::_parseArgs($args, 'rf'); // "f" does nothing but I like it :-)
                      if (PEAR::isError($opts)) {
                          return self::raiseError($opts);
              Severity: Minor
              Found in class/pear/System.php - About 1 hr to fix

                Method _mediumPhotoTreatment has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function _mediumPhotoTreatment($photoName, $filePath = null, $mediumFilePath = null)
                    {
                        /** @var Extgallery\Helper $helper */
                        $helper = Extgallery\Helper::getInstance();
                
                
                Severity: Minor
                Found in class/PhotoHandler.php - About 1 hr to fix

                  Function add has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                  Open

                          add: function(element, interval, label, fn, times) {
                              var counter = 0;
                  
                              if (jQuery.isFunction(label)) {
                                  if (!times)
                  Severity: Minor
                  Found in assets/js/galleryview/timers.js - About 1 hr 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 extgallery_tag_iteminfo has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function extgallery_tag_iteminfo(&$items)
                  {
                      if (empty($items) || !is_array($items)) {
                          return false;
                      }
                  Severity: Minor
                  Found in class/plugins/plugin.tag.php - About 1 hr 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 PclTarCreate has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                  Open

                      function PclTarCreate($p_tarname, $p_filelist = '', $p_mode = '', $p_add_dir = '', $p_remove_dir = '')
                      {
                          TrFctStart(__FILE__, __LINE__, 'PclTarCreate', "tar=$p_tarname, file='$p_filelist', mode=$p_mode, add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
                          $v_result = 1;
                  
                  
                  Severity: Minor
                  Found in class/pcltar.lib.php - About 1 hr 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 _postProcess has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function _postProcess($type, $quality)
                      {
                          array_unshift($this->command, $this->_prepare_cmd(IMAGE_TRANSFORM_NETPBM_PATH, mb_strtolower($this->type) . 'topnm', escapeshellarg($this->image)));
                          $arg     = '';
                          $type    = mb_strtolower($type);
                  Severity: Minor
                  Found in class/pear/Image/Transform/Driver/NetPBM.php - About 1 hr 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 11 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function __construct($error_class = null)
                      {
                          $classname = strtolower(get_class($this));
                          if ($this->_debug) {
                              print "PEAR constructor called, class=$classname\n";
                  Severity: Minor
                  Found in class/pear/PEAR.php - About 1 hr 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 rrmdir has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public static function rrmdir($src)
                      {
                          // 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 1 hr 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 _getSizes has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _getSizes: function() {
                  
                          var self = this,
                              norm = {
                                  small: '72c',
                  Severity: Minor
                  Found in assets/js/galleria/plugins/picasa/galleria.picasa.js - About 1 hr to fix

                    Function add has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            add: function(elem, to, from, hide) {
                                if (!elem) {
                                    return;
                                }
                                if (!idle.bound) {
                    Severity: Minor
                    Found in assets/js/galleria/galleria-1.3.3.js - About 1 hr to fix

                      Function loop has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              loop: function() {
                      
                                  var distance = this.to - this.pos,
                                      factor = 1;
                      
                      
                      Severity: Minor
                      Found in assets/js/galleria/galleria-1.3.3.js - About 1 hr to fix

                        Function rescale has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                rescale: function(event) {
                        
                                    // calculate
                                    var width = Math.min( $(window).width(), lightbox.width ),
                                        height = Math.min( $(window).height(), lightbox.height ),
                        Severity: Minor
                        Found in assets/js/galleria/galleria-1.1.js - About 1 hr to fix

                          Function add has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  add: function(elem, to, from, hide) {
                                      if ( !elem || Galleria.TOUCH ) {
                                          return;
                                      }
                                      if (!idle.bound) {
                          Severity: Minor
                          Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

                            Function loadTheme has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            Galleria.loadTheme = function( src, options ) {
                            
                                var loaded = false,
                                    length = _galleries.length;
                            
                            
                            Severity: Minor
                            Found in assets/js/galleria/galleria-1.1.js - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language