spotweb/spotweb

View on GitHub

Showing 668 of 850 total issues

File jquery.mobile-1.4.5.js has 10421 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
* jQuery Mobile 1.4.5
* Git HEAD hash: 68e55e78b292634d3991c795f06f5e37a512decc <> Date: Fri Oct 31 2014 17:33:30 UTC
* http://jquerymobile.com
*
Severity: Major
Found in js/jquery.mobile-1.4.5/jquery.mobile-1.4.5.js - About 1 mo to fix

    Function compressCategorySelection has a Cognitive Complexity of 157 (exceeds 5 allowed). Consider refactoring.
    Open

        public function compressCategorySelection($categoryList, $strongNotList)
        {
            SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
            $compressedList = '';
    
    
    Severity: Minor
    Found in lib/services/Search/Services_Search_QueryParser.php - About 3 days 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 address has 619 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        $.address = (function () {
    
            var _trigger = function(name) {
                    var ev = $.extend($.Event(name),
                        (function() {
    Severity: Major
    Found in templates/we1rdo/js/jquery.address.js - About 3 days to fix

      File scripts.js has 1090 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      $.address.init(function() {
          $('.spotlink').address();
      }).externalChange(
              function(event) {
                  basePATH = location.href.replace('#' + $.address.value(), '');
      Severity: Major
      Found in templates/we1rdo/js/scripts.js - About 2 days to fix

        Function process has a Cognitive Complexity of 129 (exceeds 5 allowed). Consider refactoring.
        Open

            public function process($hdrList, $curArtNr, $increment, $timer)
            {
                $this->displayStatus('progress', $curArtNr.' till '.$increment);
        
                $signedCount = 0;
        Severity: Minor
        Found in lib/services/Retriever/Services_Retriever_Spots.php - About 2 days 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 ajaxSubmit has 504 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        $.fn.ajaxSubmit = function(options) {
            /*jshint scripturl:true */
        
            // fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
            if (!this.length) {
        Severity: Major
        Found in js/jquery/jquery.form.js - About 2 days to fix

          Function categoriesToJson has a Cognitive Complexity of 110 (exceeds 5 allowed). Consider refactoring.
          Open

              public function categoriesToJson()
              {
                  /*
                   * Don't allow the tree to be cached, it contains the current state of the
                   * tree
          Severity: Minor
          Found in lib/page/SpotPage_catsjson.php - About 2 days 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

          File SpotPage_newznabapi.php has 887 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          
          class SpotPage_newznabapi extends SpotPage_Abs
          {
              private $_params;
          Severity: Major
          Found in lib/page/SpotPage_newznabapi.php - About 2 days to fix

            Function createTextQuery has a Cognitive Complexity of 100 (exceeds 5 allowed). Consider refactoring.
            Open

                public function createTextQuery($searchFields, $additionalFields)
                {
                    SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
            
                    /*
            Severity: Minor
            Found in lib/dbeng/dbfts_mysql.php - About 2 days 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

            Method updateSchema has 384 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function updateSchema()
                {
                    // Drop any older (not used anymore) FTS indexes on the spots full table
                    $this->dropIndex('idx_spotsfull_fts_1', 'spotsfull');
                    $this->dropIndex('idx_spotsfull_fts_2', 'spotsfull');
            Severity: Major
            Found in lib/dbstruct/SpotStruct_abs.php - About 1 day to fix

              Function search has a Cognitive Complexity of 94 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function search($outputtype)
                  {
                      // Check users' permissions
                      $this->_spotSec->fatalPermCheck(SpotSecurity::spotsec_perform_search, '');
              
              
              Severity: Minor
              Found in lib/page/SpotPage_newznabapi.php - About 1 day 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

              SpotTemplateHelper has 98 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class SpotTemplateHelper
              {
                  protected $_settings;
                  protected $_daoFactory;
                  protected $_currentSession;
              Severity: Major
              Found in lib/SpotTemplateHelper.php - About 1 day to fix

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

                /*!
                 * jQuery Form Plugin
                 * version: 3.15 (09-SEP-2012)
                 * @requires jQuery v1.3.2 or later
                 *
                Severity: Major
                Found in js/jquery/jquery.form.js - About 1 day to fix

                  Function prepareCategorySelection has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function prepareCategorySelection($dynaList)
                      {
                          SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
                  
                          $strongNotList = [];
                  Severity: Minor
                  Found in lib/services/Search/Services_Search_QueryParser.php - About 1 day 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

                  File SpotTemplateHelper.php has 738 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  
                  // Utility class voor template functies, kan eventueel
                  // door custom templates extended worden
                  use function PHP81_BC\strftime;
                  Severity: Major
                  Found in lib/SpotTemplateHelper.php - About 1 day to fix

                    Function fileUploadIframe has 337 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function fileUploadIframe(a) {
                            var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle;
                            var useProp = !!$.fn.prop;
                    
                            if ($(':input[name=submit],:input[id=submit]', form).length) {
                    Severity: Major
                    Found in js/jquery/jquery.form.js - About 1 day to fix

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

                      /*
                       * jQuery Address Plugin v1.5
                       * http://www.asual.com/jquery/address/
                       *
                       * Copyright (c) 2009-2010 Rostislav Hristov
                      Severity: Major
                      Found in templates/we1rdo/js/jquery.address.js - About 1 day to fix

                        File Dao_Base_Spot.php has 614 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        
                        class Dao_Base_Spot implements Dao_Spot
                        {
                            protected $_conn;
                        Severity: Major
                        Found in lib/dao/Base/Dao_Base_Spot.php - About 1 day to fix

                          Method process has 252 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function process($hdrList, $curArtNr, $increment, $timer)
                              {
                                  $this->displayStatus('progress', $curArtNr.' till '.$increment);
                          
                                  $signedCount = 0;
                          Severity: Major
                          Found in lib/services/Retriever/Services_Retriever_Spots.php - About 1 day to fix

                            Function parseHeader has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function parseHeader($subj, $from, $date, $messageid, $rsaKeys)
                                {
                                    // Initialize an empty array, we create a basic template in a few
                                    $spot = [];
                            
                            
                            Severity: Minor
                            Found in lib/services/Format/Services_Format_Parsing.php - About 1 day 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