canax/request

View on GitHub

Showing 20 of 33 total issues

File jquery.iviewer.js has 700 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * iviewer Widget for jQuery UI
 * https://github.com/can3p/iviewer
 *
 * Copyright (c) 2009 - 2012 Dmitry Petrov
Severity: Major
Found in doc/api/js/jquery.iviewer.js - About 1 day to fix

    File jquery.dotdotdot-1.5.9.js has 520 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*    
     *    jQuery dotdotdot 1.5.9
     *    
     *    Copyright (c) 2013 Fred Heusschen
     *    www.frebsite.nl
    Severity: Major
    Found in doc/api/js/jquery.dotdotdot-1.5.9.js - About 1 day to fix

      Function dotdotdot has 203 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          $.fn.dotdotdot = function( o )
          {
              if ( this.length == 0 )
              {
                  if ( !o || o.debug !== false )
      Severity: Major
      Found in doc/api/js/jquery.dotdotdot-1.5.9.js - About 1 day to fix

        Function bind_events has 97 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                $dot.bind_events = function()
                {
                    $dot.bind(
                        'update.dot',
                        function( e, c )
        Severity: Major
        Found in doc/api/js/jquery.dotdotdot-1.5.9.js - About 3 hrs to fix

          Function _create has 70 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _create: function() {
                  var me = this;
          
                  //drag variables
                  this.dx = 0;
          Severity: Major
          Found in doc/api/js/jquery.iviewer.js - About 2 hrs to fix

            Function ellipsisElement has 65 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function ellipsisElement( $e, $d, $i, o, after )
                {
                    var isTruncated    = false,
                        e = $e[ 0 ];
            
            
            Severity: Major
            Found in doc/api/js/jquery.dotdotdot-1.5.9.js - About 2 hrs to fix

              Function handler has 60 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function handler(event) {
                      var orgEvent   = event || window.event,
                          args       = slice.call(arguments, 1),
                          delta      = 0,
                          deltaX     = 0,
              Severity: Major
              Found in doc/api/js/jquery.mousewheel.js - About 2 hrs to fix

                Request has 22 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class Request
                {
                    /**
                     * @var string $requestUri Request URI from $_SERVER.
                     * @var string $scriptName Scriptname from $_SERVER, actual scriptname part.
                Severity: Minor
                Found in src/Request/Request.php - About 2 hrs to fix

                  Function setImageProps has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      this.setImageProps = function(disp_w, disp_h, x, y, skip_animation, complete) {
                          complete = complete || jQuery.noop;
                  
                          this.display_width(disp_w);
                          this.display_height(disp_h);
                  Severity: Minor
                  Found in doc/api/js/jquery.iviewer.js - About 1 hr to fix

                    Function set_zoom has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        set_zoom: function(new_zoom, skip_animation, zoom_center)
                        {
                            if (this._trigger('onZoom', 0, new_zoom) == false) {
                                return;
                            }
                    Severity: Minor
                    Found in doc/api/js/jquery.iviewer.js - About 1 hr to fix

                      Function watch has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              $dot.watch = function()
                              {
                                  $dot.unwatch();
                                  if ( opts.watch == 'window' )
                                  {
                      Severity: Minor
                      Found in doc/api/js/jquery.dotdotdot-1.5.9.js - About 1 hr to fix

                        Function ellipsis has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function ellipsis( $elem, $d, $i, o, after )
                            {
                                var $elements     = $elem.contents(),
                                    isTruncated    = false;
                        
                        
                        Severity: Minor
                        Found in doc/api/js/jquery.dotdotdot-1.5.9.js - About 1 hr to fix

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

                              public function extractRoute()
                              {
                                  $requestUri = $this->requestUri;
                                  $scriptPath = $this->path;
                                  $scriptFile = $this->scriptName;
                          Severity: Minor
                          Found in src/Request/Request.php - About 1 hr to fix

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

                            window.onload = function() {
                                function addIcon(el, entity) {
                                    var html = el.innerHTML;
                                    el.innerHTML = '<span style="font-family: \'phpdocumentor-clean-icons\'">' + entity + '</span>' + html;
                                }
                            Severity: Minor
                            Found in doc/api/css/phpdocumentor-clean-icons/lte-ie7.js - About 1 hr to fix

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

                                  function children( $elem, o, after )
                                  {
                                      var $elements     = $elem.children(),
                                          isTruncated    = false;
                              
                              
                              Severity: Minor
                              Found in doc/api/js/jquery.dotdotdot-1.5.9.js - About 1 hr to fix

                                Function onload has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                Open

                                window.onload = function() {
                                    function addIcon(el, entity) {
                                        var html = el.innerHTML;
                                        el.innerHTML = '<span style="font-family: \'phpdocumentor-clean-icons\'">' + entity + '</span>' + html;
                                    }
                                Severity: Minor
                                Found in doc/api/css/phpdocumentor-clean-icons/lte-ie7.js - About 45 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 setImageProps has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    this.setImageProps = function(disp_w, disp_h, x, y, skip_animation, complete) {
                                Severity: Minor
                                Found in doc/api/js/jquery.iviewer.js - About 45 mins to fix

                                  Function ellipsisElement has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      function ellipsisElement( $e, $d, $i, o, after )
                                  Severity: Minor
                                  Found in doc/api/js/jquery.dotdotdot-1.5.9.js - About 35 mins to fix

                                    Function ellipsis has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        function ellipsis( $elem, $d, $i, o, after )
                                    Severity: Minor
                                    Found in doc/api/js/jquery.dotdotdot-1.5.9.js - About 35 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                              return false;
                                      Severity: Major
                                      Found in doc/api/js/jquery.dotdotdot-1.5.9.js - About 30 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language