original_string: public function getSurveyData($surveyId) {
          $tracker = $this->loader->getTracker();
  
          $survey = $tracker->getSurvey($surveyId);
  
          $surveyInfo = $survey->getQuestionInformation($this->locale);
  
          $filteredSurveyInfo = $surveyInfo;
          foreach ($surveyInfo as $questionCode => $questionInfo) {
              if ($questionInfo['class'] == 'question_sub') {
                  $parentCode                                           = $questionInfo['title'];
                  $parent                                               = $surveyInfo[$parentCode];
                  $filteredSurveyInfo[$questionCode]['question'] = $parent['question'] . ' | ' . $questionInfo['question'];
                  if (isset($filteredSurveyInfo[$parentCode])) {
                      unset($filteredSurveyInfo[$parentCode]);
                  }
              }
          }
  
          return $filteredSurveyInfo;
      }
code: public function getSurveyData($surveyId) {
          $tracker = $this->loader->getTracker();
  
          $survey = $tracker->getSurvey($surveyId);
  
          $surveyInfo = $survey->getQuestionInformation($this->locale);
  
          $filteredSurveyInfo = $surveyInfo;
          foreach ($surveyInfo as $questionCode => $questionInfo) {
              if ($questionInfo['class'] == 'question_sub') {
                  $parentCode                                           = $questionInfo['title'];
                  $parent                                               = $surveyInfo[$parentCode];
                  $filteredSurveyInfo[$questionCode]['question'] = $parent['question'] . ' | ' . $questionInfo['question'];
                  if (isset($filteredSurveyInfo[$parentCode])) {
                      unset($filteredSurveyInfo[$parentCode]);
                  }
              }
          }
  
          return $filteredSurveyInfo;
      }
code_tokens: public function getSurveyData ( $ surveyId ) { $ tracker = $ this -> loader -> getTracker ( ) ; $ survey = $ tracker -> getSurvey ( $ surveyId ) ; $ surveyInfo = $ survey -> getQuestionInformation ( $ this -> locale ) ; $ filteredSurveyInfo = $ surveyInfo ; foreach ( $ surveyInfo as $ questionCode => $ questionInfo ) { if ( $ questionInfo [ 'class' ] == 'question_sub' ) { $ parentCode = $ questionInfo [ 'title' ] ; $ parent = $ surveyInfo [ $ parentCode ] ; $ filteredSurveyInfo [ $ questionCode ] [ 'question' ] = $ parent [ 'question' ] . ' | ' . $ questionInfo [ 'question' ] ; if ( isset ( $ filteredSurveyInfo [ $ parentCode ] ) ) { unset ( $ filteredSurveyInfo [ $ parentCode ] ) ; } } } return $ filteredSurveyInfo ; }
docstring: Gets question information about the survey structure from a specific survey and makes the result readable
  
  @param $surveyId int ID of the survey
  @return array List of survey information
docstring_tokens: Gets question information about the survey structure from a specific survey and makes the result readable