mambax7/extgallery

View on GitHub

Showing 701 of 9,653 total issues

Method rotate has 130 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function rotate($angle, $options = null)
    {
        if (null === $options) {
            $autoresize = true;
            $color_mask = [255, 255, 0];
Severity: Major
Found in class/pear/Image/Transform/Driver/GD1.php - About 5 hrs to fix

    Function _transitions has 128 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _transitions = (function() {
    
            var _slide = function(params, complete, fade, door) {
    
                var easing = this.getOptions('easing'),
    Severity: Major
    Found in assets/js/galleria/galleria-1.3.5.js - About 5 hrs to fix

      Function _transitions has 128 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _transitions = (function() {
      
              var _slide = function(params, complete, fade, door) {
      
                  var easing = this.getOptions('easing'),
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.3.js - About 5 hrs to fix

        File form_setup_html.php has 379 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        defined('C5_EXECUTE') || exit('Access denied.');
        
        // Load TinyMCE

          Function showItem has 127 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  function showItem(i) {
                      // Disable next/prev buttons until transition is complete
                      // This prevents overlapping of animations
                      $('.nav-next-overlay',j_gallery).unbind('click');
                      $('.nav-prev-overlay',j_gallery).unbind('click');
          Severity: Major
          Found in assets/js/galleryview/galleryview.js - About 5 hrs to fix

            File admin.php has 376 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            
            define('_AM_EXTGALLERY_CATEGORY', 'Category');
            define('_AM_EXTGALLERY_INFORMATION', 'Information');
            define('_AM_EXTGALLERY_PARENT_CAT', 'Parent category');
            Severity: Minor
            Found in language/english/admin.php - About 5 hrs to fix

              Function init has 125 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  init: function( target, options ) {
              
                      options = _legacyOptions( options );
              
                      // save the original ingredients
              Severity: Major
              Found in assets/js/galleria/galleria-1.3.3.js - About 5 hrs to fix

                Method extgalleryBlockEdit has 123 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function extgalleryBlockEdit($options)
                {
                    /** @var Extgallery\Category $catHandler */
                    $catHandler = Extgallery\Helper::getInstance()->getHandler('PublicCategory');
                
                
                Severity: Major
                Found in blocks/extgallery_blocks.php - About 4 hrs to fix

                  Function _parseShortOption has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
                  Open

                      protected static function _parseShortOption($arg, $short_options, &$opts, &$argIdx, $args, $skip_unknown)
                      {
                          for ($i = 0, $iMax = strlen($arg); $i < $iMax; ++$i) {
                              $opt     = $arg[$i];
                              $opt_arg = null;
                  Severity: Minor
                  Found in class/pear/Console/Getopt.php - About 4 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 init has 122 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      init: function( target, options ) {
                  
                          options = _legacyOptions( options );
                  
                          // save the original ingredients
                  Severity: Major
                  Found in assets/js/galleria/galleria-1.3.5.js - About 4 hrs to fix

                    File System.php has 370 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    /**
                     * File/Directory manipulation
                     *
                     * PHP versions 4 and 5
                    Severity: Minor
                    Found in class/pear/System.php - About 4 hrs to fix

                      Function prep has 120 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          publicMethod.prep = function (object) {
                              if (!open) {
                                  return;
                              }
                      
                      
                      Severity: Major
                      Found in assets/js/ml-slider/assets/colorbox/jquery.colorbox-min.js - About 4 hrs to fix

                        Function animate has 118 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                    animate : (function() {
                        
                                        // detect transition
                                        var transition = (function( style ) {
                                            var props = 'transition WebkitTransition MozTransition OTransition'.split(' '),
                        Severity: Major
                        Found in assets/js/galleria/galleria-1.3.3.js - About 4 hrs to fix

                          Function animate has 118 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                      animate : (function() {
                          
                                          // detect transition
                                          var transition = (function( style ) {
                                              var props = 'transition WebkitTransition MozTransition OTransition'.split(' '),
                          Severity: Major
                          Found in assets/js/galleria/galleria-1.3.5.js - About 4 hrs to fix

                            Function _parseLongOption has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                            Open

                                protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
                                {
                                    @list($opt, $opt_arg) = explode('=', $arg, 2);
                            
                                    $opt_len = strlen($opt);
                            Severity: Minor
                            Found in class/pear/Console/Getopt.php - About 4 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 complementOptions has 113 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function complementOptions( o, $tos, _tos )
                                {
                            
                                    //  Complement objects
                            
                            
                            Severity: Major
                            Found in assets/js/TosRUs/src/js/jquery.tosrus.js - About 4 hrs to fix

                              Method extgalleryAjaxEdit has 113 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function extgalleryAjaxEdit($options)
                              {
                                  $catHandler = Extgallery\Helper::getInstance()->getHandler('PublicCategory');
                              
                                  $form = _MB_EXTGALLERY_PHOTO_NUMBER . ' : <input name="options[]" size="5" maxlength="255" value="' . $options[0] . '" type="text"><br>';
                              Severity: Major
                              Found in blocks/extgallery_blocks.php - About 4 hrs to fix

                                Method PclTarHandleExtractFile has 111 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function PclTarHandleExtractFile($p_tar, &$v_header, $p_path, $p_remove_path, $p_tar_mode)
                                    {
                                        TrFctStart(__FILE__, __LINE__, 'PclTarHandleExtractFile', "archive_descr='$p_tar', path=$p_path, remove_path='$p_remove_path', tar_mode=$p_tar_mode");
                                        $v_result = 1;
                                
                                
                                Severity: Major
                                Found in class/pcltar.lib.php - About 4 hrs to fix

                                  Function remove has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                          remove: function(element, label, fn) {
                                              var timers = jQuery.data(element, this.dataKey), ret;
                                  
                                              if ( timers ) {
                                  
                                  
                                  Severity: Minor
                                  Found in assets/js/galleryview/timers.js - About 4 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 FlameViewportScale has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  function FlameViewportScale() {
                                      this.delay = 600; // Delay after calling update to account for viewport bounce
                                      this.orientation;
                                      this.screenWidth; // Screen width corrected for orientation
                                      this.timeout;
                                  Severity: Minor
                                  Found in assets/js/TosRUs/lib/FlameViewportScale.js - About 4 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

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language