spotweb/spotweb

View on GitHub

Showing 668 of 850 total issues

Function refresh has 116 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    refresh: function( val, isfromControl, preventInputUpdate ) {
        // NOTE: we don't return here because we want to support programmatic
        //       alteration of the input value, which should still update the slider

        var self = this,
Severity: Major
Found in js/jquery.mobile-1.4.5/jquery.mobile-1.4.5.js - About 4 hrs to fix

    Function _mouseDrag has 115 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            _mouseDrag: function(event) {
    
                //Compute the helpers position
                this.position = this._generatePosition(event);
                this.positionAbs = this._convertPositionTo("absolute");
    Severity: Major
    Found in templates/we1rdo/js/jquery.ui.nestedSortable.js - About 4 hrs to fix

      Method spotDetails has 114 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function spotDetails($outputtype)
          {
              if (empty($this->_params['messageid'])) {
                  $this->showApiError(200);
      
      
      Severity: Major
      Found in lib/page/SpotPage_newznabapi.php - About 4 hrs to fix

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

            _create: function() {
        
                // TODO: Each of these should have comments explain what they're for
                var self = this,
                    control = this.element,
        Severity: Major
        Found in js/jquery.mobile-1.4.5/jquery.mobile-1.4.5.js - About 4 hrs to fix

          SpotStruct_abs has 35 functions (exceeds 20 allowed). Consider refactoring.
          Open

          abstract class SpotStruct_abs
          {
              protected $_dbcon;
          
              public function __construct(dbeng_abs $dbEng)
          Severity: Minor
          Found in lib/dbstruct/SpotStruct_abs.php - About 4 hrs to fix

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

                public function process($hdrList, $curArtNr, $increment, $timer)
                {
                    $this->displayStatus('progress', $curArtNr.' till '.$increment);
            
                    $lastProcessedId = '';
            Severity: Major
            Found in lib/services/Retriever/Services_Retriever_Comments.php - About 4 hrs to fix

              File SpotStruct_mysql.php has 347 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              
              class SpotStruct_mysql extends SpotStruct_abs
              {
                  /*
              Severity: Minor
              Found in lib/dbstruct/SpotStruct_mysql.php - About 4 hrs to fix

                Function tokenize has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function tokenize($nowtag = [])
                    {
                        $curcnt = 0;
                        $tagcfg = null;
                        $contents[$curcnt] = $this->newcontent();
                Severity: Minor
                Found in lib/ubb/SpotUbb_parser.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 validateSettings has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function validateSettings($settings)
                    {
                        $result = new Dto_FormResult();
                
                        // Define arrays with valid settings
                Severity: Minor
                Found in lib/services/Settings/Services_Settings_Base.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

                Services_NzbHandler_abs has 33 functions (exceeds 20 allowed). Consider refactoring.
                Open

                abstract class Services_NzbHandler_abs
                {
                    protected $_name = 'Abstract';
                    protected $_nameShort = 'Abstract';
                
                
                Severity: Minor
                Found in lib/services/NzbHandler/Services_NzbHandler_abs.php - About 4 hrs to fix

                  Dao_Base_Cache has 33 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class Dao_Base_Cache implements Dao_Cache
                  {
                      private $_cachePath = '';
                      protected $_conn;
                  
                  
                  Severity: Minor
                  Found in lib/dao/Base/Dao_Base_Cache.php - About 4 hrs to fix

                    Method validateUserPreferences has 103 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function validateUserPreferences($prefs, $currentPrefs)
                        {
                            $result = new Dto_FormResult();
                    
                            // Define several arrays with valid settings
                    Severity: Major
                    Found in lib/services/User/Services_User_Record.php - About 4 hrs to fix

                      File editsettings.inc.php has 337 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      
                      require __DIR__.'/includes/header.inc.php';
                      require __DIR__.'/includes/form-messages.inc.php';
                      
                      
                      Severity: Minor
                      Found in templates/we1rdo/editsettings.inc.php - About 4 hrs to fix

                        Function fetchSpotComments has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function fetchSpotComments($msgId, $prevMsgids, $userId, $start, $length)
                            {
                                /*
                                 * Calculate the total amount of comments we want to retrieve
                                 */
                        Severity: Minor
                        Found in lib/services/Providers/Services_Providers_Comments.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 parseParameters has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                        Open

                            private static function parseParameters($noopt = [])
                            {
                                $result = [];
                                if (!isset($GLOBALS['argv'])) {
                                    return $result;
                        Severity: Minor
                        Found in lib/SpotCommandline.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

                        Services_NzbHandler_NZBVortex has 32 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class Services_NzbHandler_NZBVortex extends Services_NzbHandler_abs
                        {
                            private $_host = null;
                            private $_url = null;
                            private $_apikey = null;
                        Severity: Minor
                        Found in lib/services/NzbHandler/Services_NzbHandler_NZBVortex.php - About 4 hrs to fix

                          Method updateExternalList has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function updateExternalList($newlist, $idtype)
                              {
                                  $updatelist = [];
                                  $updskipped = 0;
                                  $countnewlistspotterid = 0;
                          Severity: Major
                          Found in lib/dao/Base/Dao_Base_BlackWhiteList.php - About 3 hrs to fix

                            Function openDialog has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                            Open

                            function openDialog(divid, title, url, buttonClick, successAction, closeCb, openCb) {
                                var $dialdiv = $("#" + divid);
                            
                                /*
                                 * Test whether we need to 'dialog'-ify the
                            Severity: Minor
                            Found in templates/we1rdo/js/spotdialogs.js - About 3 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 filtersToXml has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function filtersToXml($filterList)
                                {
                                    $svcSearchQP = new Services_Search_QueryParser($this->_daoFactory->getConnection());
                            
                                    // create the XML document
                            Severity: Minor
                            Found in lib/services/User/Services_User_Filters.php - About 3 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 prepareFilterValues has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                            Open

                                private function prepareFilterValues($search)
                                {
                                    SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
                                    $filterValueList = [];
                            
                            
                            Severity: Minor
                            Found in lib/services/Search/Services_Search_QueryParser.php - About 3 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