GemsTracker/gemstracker-library

View on GitHub

Showing 1,617 of 4,272 total issues

File GemsEscort.php has 1410 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

/**
 * Project Application Core code
 *
Severity: Major
Found in classes/GemsEscort.php - About 3 days to fix

    File User.php has 1320 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    /**
     *
     * @package    Gems
    Severity: Major
    Found in classes/Gems/User/User.php - About 3 days to fix

      File Token.php has 1186 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
      /**
       *
       * @package    Gems
      Severity: Major
      Found in classes/Gems/Tracker/Token.php - About 3 days to fix

        Gems_User_User has 118 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class Gems_User_User extends \MUtil_Translate_TranslateableAbstract
        {
            /**
             *
             * @var TwoFactorAuthenticatorInterface
        Severity: Major
        Found in classes/Gems/User/User.php - About 2 days to fix

          File RespondentTrack.php has 928 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          
          /**
           *
           * @package    Gems
          Severity: Major
          Found in classes/Gems/Tracker/RespondentTrack.php - About 2 days to fix

            File LimeSurvey1m9Database.php has 868 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            
            /**
             *
             * @package    Gems
            Severity: Major
            Found in classes/Gems/Tracker/Source/LimeSurvey1m9Database.php - About 2 days to fix

              Gems_Tracker_Token has 105 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class Gems_Tracker_Token extends \Gems_Registry_TargetAbstract
              {
                  use TranslateableTrait;
              
                  const COMPLETION_NOCHANGE = 0;
              Severity: Major
              Found in classes/Gems/Tracker/Token.php - About 2 days to fix

                File Agenda.php has 830 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                
                /**
                 *
                 * @package    Gems
                Severity: Major
                Found in classes/Gems/Agenda.php - About 1 day to fix

                  Function getModel has a Cognitive Complexity of 97 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function getModel()
                      {
                          if (empty($this->model)) {
                              try {
                                  $model = new \Gems_Model_JoinModel($this->getFormID(), $this->getTableName(), 'orf');
                  Severity: Minor
                  Found in classes/OpenRosa/Tracker/Source/Form.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 ImportTrackSnippetAbstract.php has 767 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  
                  /**
                   *
                   * @package    Gems
                  Severity: Major
                  Found in classes/Gems/Tracker/Snippets/ImportTrackSnippetAbstract.php - About 1 day to fix

                    Function checkSurvey has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function checkSurvey($sourceSurveyId, $surveyId, $userId)
                        {
                            $messages = array();
                            $survey   = $this->tracker->getSurvey($surveyId);
                    
                    
                    Severity: Minor
                    Found in classes/Gems/Tracker/Source/LimeSurvey1m9Database.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 TrackAction.php has 737 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    
                    /**
                     *
                     * @package    Gems
                    Severity: Major
                    Found in classes/Gems/Default/TrackAction.php - About 1 day to fix

                      File ProjectSettings.php has 730 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      
                      /**
                       *
                       * @package    Gems
                      Severity: Major
                      Found in classes/Gems/Project/ProjectSettings.php - About 1 day to fix

                        File Menu.php has 726 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        
                        /**
                         * @package    Gems
                         * @subpackage Menu
                        Severity: Major
                        Found in classes/Gems/Menu.php - About 1 day to fix

                          Function loadFormData has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring.
                          Open

                              protected function loadFormData()
                              {
                                  parent::loadFormData();
                          
                                  if ($this->createData && ($this->request->isPost() && (! isset($this->formData[$this->saveButtonId])))) {
                          Severity: Minor
                          Found in classes/Gems/Snippets/Respondent/RespondentFormSnippet.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 RespondentModel.php has 723 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          
                          use Gems\Exception\RespondentAlreadyExists;
                          
                          /**
                          Severity: Major
                          Found in classes/Gems/Model/RespondentModel.php - About 1 day to fix

                            File LimeSurvey1m9FieldMap.php has 702 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            <?php
                            
                            /**
                             *
                             * @package    Gems
                            Severity: Major
                            Found in classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php - About 1 day to fix

                              Gems_Project_ProjectSettings has 79 functions (exceeds 20 allowed). Consider refactoring.
                              Open

                              class Gems_Project_ProjectSettings extends \ArrayObject
                              {
                                  /**
                                   * The db adapter for the responses
                                   *
                              Severity: Major
                              Found in classes/Gems/Project/ProjectSettings.php - About 1 day to fix

                                GemsEscort has 77 functions (exceeds 20 allowed). Consider refactoring.
                                Open

                                class GemsEscort extends \MUtil_Application_Escort
                                {
                                    /**
                                     * Default reception code value
                                     */
                                Severity: Major
                                Found in classes/GemsEscort.php - About 1 day to fix

                                  Function processForm has a Cognitive Complexity of 72 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      protected function processForm($saveLabel = null, $data = null)
                                      {
                                          $model   = $this->getModel();
                                          $mname   = $model->getName();
                                          $request = $this->getRequest();
                                  Severity: Minor
                                  Found in classes/Gems/Controller/BrowseEditAction.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