public function getQuestionsDataForStatisticExcel(): array 	{ 		$exportPdfService = new ExportPdfService; 		$all_questions = []; 		$all_categories = []; 		$client_survey_years = []; 		$client_surveys = [];  		foreach ($this->filtered_client_surveys as $key => $client_survey) { 			$applicant_ids = $client_survey->applicants->pluck('id')->toArray();  			$questions = $client_survey->mainQuestions()->get(); 			$question_ids = $questions->pluck('id')->toArray();  			$questions_answers = $this->client_survey_service->calculateClientSurveyQuestionsAverageScore($question_ids, $applicant_ids); 			$questions = $this->getQuestionAnswersWithTitleAndScore($questions_answers, $client_survey, $this->locale);  			$categories = $client_survey->survey->categories->load(['questions']);  			if ($key == 0 && count($questions)) { 				array_push($all_questions, $questions); 				$all_questions = collect($all_questions)->flatten(1)->toArray();  				foreach ($all_questions as $key => $question) { 					$all_questions[$key]['scores'] = []; 					$all_questions[$key]['codes'] = []; 					$all_questions[$key]['other_survey_answers'] = []; 				}  				$categories_with_avg_score = $exportPdfService->getCategoriesAverageScore($categories, $this->locale, $applicant_ids);  				foreach ($categories_with_avg_score as $key => $category_score) { 					array_push($all_categories, [ 						'name' => $categories[$key]->getTranslation('name', $this->locale), 						'score' => round($category_score['score'], 3), 						'code' => $categories[$key]['code'], 						'scores' => [], 						'codes' => [], 					]); 				} 			} else { 				$scores = collect($questions)->pluck('score')->toArray(); 				$codes = collect($questions)->pluck('code')->toArray(); 				$answers = collect($questions)->pluck('answers');  				if (count($questions)) { 					foreach ($all_questions as $key => $question) { 						array_push($all_questions[$key]['scores'], $scores[$key]); 						array_push($all_questions[$key]['codes'], $codes[$key]); 						array_push($all_questions[$key]['other_survey_answers'], $answers[$key]); 					}  					$categories_with_avg_score = $exportPdfService->getCategoriesAverageScore($categories, $this->locale, $applicant_ids);  					foreach ($categories_with_avg_score as $key => $category) { 						array_push($all_categories[$key]['scores'], $category['score']); 						array_push($all_categories[$key]['codes'], $category['code']); 					} 				} 			}  			if (count($questions)) { 				array_push($client_survey_years, $client_survey->survey->year); 				array_push($client_surveys, [ 					'client_survey' => $client_survey, 					'applicants_number' => $client_survey->getApplicants()->count(), 				]); 			} 		}  		return [ 			'questions' => $all_questions, 			'categories' => $all_categories, 			'client_survey_years' => $client_survey_years, 			'client_surveys' => $client_surveys, 		]; 	}