spotweb/spotweb

View on GitHub

Showing 668 of 850 total issues

File SpotStruct_pgsql.php has 410 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

class SpotStruct_pgsql extends SpotStruct_abs
{
    /*
Severity: Minor
Found in lib/dbstruct/SpotStruct_pgsql.php - About 5 hrs to fix

    File SpotInstall.php has 410 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    /**
     * Created by PhpStorm.
     * User: root
    Severity: Minor
    Found in lib/SpotInstall.php - About 5 hrs to fix

      Function hasUrlForSpot has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
      Open

          public function hasUrlForSpot()
          {
              if ($this->alternateDownloadUrl) {
                  return true;
              }
      Severity: Minor
      Found in lib/services/Providers/Services_Providers_HttpNzb.php - About 5 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 categoryListToSql has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
      Open

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

      File index.php has 404 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
      //error_reporting(2147483647);
      //ini_set('display_errors', 1);
      
      
      Severity: Minor
      Found in index.php - About 5 hrs to fix

        Method filterValuesToSql has 140 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function filterValuesToSql($filterValueList, $currentSession)
            {
                SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
        
                // Add a list of possible text searches
        Severity: Major
        Found in lib/services/Search/Services_Search_QueryParser.php - About 5 hrs to fix

          File Dao_Base_User.php has 397 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          
          class Dao_Base_User implements Dao_User
          {
              protected $_conn;
          Severity: Minor
          Found in lib/dao/Base/Dao_Base_User.php - About 5 hrs to fix

            Function parseFull has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
            Open

                public function parseFull($xmlStr)
                {
                    // Create a template array so we always have the full fields to prevent ugly notices
                    $tpl_spot = ['category' => '', 'website' => '', 'image' => '', 'sabnzbdurl' => '', 'messageid' => '', 'searchurl' => '', 'description' => '',
                        'sub'               => '', 'filesize' => '', 'poster' => '', 'tag' => '', 'nzb' => [], 'title' => '',
            Severity: Minor
            Found in lib/services/Format/Services_Format_Parsing.php - About 5 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 drawGraph has 127 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function drawGraph(currentSpeed,interval) {
                var numXLabels = 8;
                var numYLabels = 5;
            
                if($("table.sabGraphData tbody > tr").size() == 1) {
            Severity: Major
            Found in templates/we1rdo/js/sabpanel.js - About 5 hrs to fix

              Function transition has 126 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      transition: function( toPage, triggerData, settings ) {
                          var fromPage, url, pageUrl, fileUrl,
                              active, activeIsInitialPage,
                              historyDir, pageTitle, isDialog,
                              alreadyThere, newPageTitle,
              Severity: Major
              Found in js/jquery.mobile-1.4.5/jquery.mobile-1.4.5.js - About 5 hrs to fix

                Function updateSabPanel has 126 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function updateSabPanel(start,limit) {
                    var baseURL = sabBaseURL();
                    var url = baseURL+'&action=getstatus';
                
                    $.getJSON(url, function(json){
                Severity: Major
                Found in templates/we1rdo/js/sabpanel.js - About 5 hrs to fix

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

                          function cb(e) {
                              if (xhr.aborted || callbackProcessed) {
                                  return;
                              }
                              try {
                  Severity: Major
                  Found in js/jquery/jquery.form.js - About 5 hrs to fix

                    Consider simplifying this complex logical expression.
                    Open

                        if (
                            // iOS 4.3 and older : Platform is iPhone/Pad/Touch and Webkit version is less than 534 (ios5)
                            ( ( platform.indexOf( "iPhone" ) > -1 || platform.indexOf( "iPad" ) > -1  || platform.indexOf( "iPod" ) > -1 ) && wkversion && wkversion < 534 ) ||
                            // Opera Mini
                            ( w.operamini && ({}).toString.call( w.operamini ) === "[object OperaMini]" ) ||
                    Severity: Critical
                    Found in js/jquery.mobile-1.4.5/jquery.mobile-1.4.5.js - About 5 hrs to fix

                      Method createTextQuery has 124 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function createTextQuery($searchFields, $additionalFields)
                          {
                              SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
                      
                              /*
                      Severity: Major
                      Found in lib/dbeng/dbfts_mysql.php - About 4 hrs to fix

                        File Services_Upgrade_Users.php has 372 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        
                        class Services_Upgrade_Users
                        {
                            private $_dbCon;
                        Severity: Minor
                        Found in lib/services/Upgrade/Services_Upgrade_Users.php - About 4 hrs to fix

                          Method spotAcat2nabcat has 122 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function spotAcat2nabcat()
                              {
                                  return [0 => // Cat0 - Image
                                          [0 => // Z0 - Movie
                                                      [0     => '2000|2030',
                          Severity: Major
                          Found in lib/page/SpotPage_newznabapi.php - About 4 hrs to fix

                            Method validateSettings has 119 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function validateSettings($settings)
                                {
                                    $result = new Dto_FormResult();
                            
                                    // Define arrays with valid settings
                            Severity: Major
                            Found in lib/services/Settings/Services_Settings_Base.php - About 4 hrs to fix

                              File Services_NzbHandler_NZBVortex.php has 365 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

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

                                Method perform has 117 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function perform($url, $lastModTime = null, $redirTries = 0)
                                    {
                                        SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
                                
                                        /*
                                Severity: Major
                                Found in lib/services/Providers/Services_Providers_Http.php - About 4 hrs to fix

                                  Services_User_Record has 36 functions (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  class Services_User_Record
                                  {
                                      private $_sessionDao;
                                      private $_userDao;
                                      private $_daoFactory;
                                  Severity: Minor
                                  Found in lib/services/User/Services_User_Record.php - About 4 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language