diff --git a/src/Services/Factories/QuestionAndAnswerCreator/AbstractQuestionAndAnswerCreator.php b/src/Services/Factories/QuestionAndAnswerCreator/AbstractQuestionAndAnswerCreator.php index 2cb633b..3e8e3e2 100644 --- a/src/Services/Factories/QuestionAndAnswerCreator/AbstractQuestionAndAnswerCreator.php +++ b/src/Services/Factories/QuestionAndAnswerCreator/AbstractQuestionAndAnswerCreator.php @@ -42,9 +42,9 @@ protected function getChoiceMapping(string|int $choiceId, string|int $questionId $answerMapping = $questionMapping['answer_mapping']; $mappingService = new SurveyMappingService(); - if($questionMapping['question_id'] !== $questionId && isset($questionMapping['subquestion_mapping'])) { + if ($questionMapping['question_id'] !== $questionId && isset($questionMapping['subquestion_mapping'])) { $subquestionMapping = $mappingService->getSubquestionMapping($questionId, $questionMapping); - if(isset($subquestionMapping['answer_mapping'])){ + if (isset($subquestionMapping['answer_mapping'])) { $answerMapping = $subquestionMapping['answer_mapping']; } } diff --git a/src/Services/Factories/ResponseCreator/AbstractQuestionResponseCreator.php b/src/Services/Factories/ResponseCreator/AbstractQuestionResponseCreator.php index 87d819d..3c416bd 100644 --- a/src/Services/Factories/ResponseCreator/AbstractQuestionResponseCreator.php +++ b/src/Services/Factories/ResponseCreator/AbstractQuestionResponseCreator.php @@ -10,7 +10,6 @@ use Statikbe\Surveyhero\Exceptions\AnswerNotImportedException; use Statikbe\Surveyhero\Exceptions\AnswerNotMappedException; use Statikbe\Surveyhero\Exceptions\QuestionNotImportedException; -use Statikbe\Surveyhero\Services\SurveyMappingService; use Statikbe\Surveyhero\SurveyheroRegistrar; abstract class AbstractQuestionResponseCreator implements QuestionResponseCreator diff --git a/src/Services/SurveyMappingService.php b/src/Services/SurveyMappingService.php index a072091..6fc7ec9 100644 --- a/src/Services/SurveyMappingService.php +++ b/src/Services/SurveyMappingService.php @@ -147,8 +147,9 @@ public function getQuestionMapping(array $surveyQuestionMapping, int|string $que /** * Returns the subquestion mapping for questions with subquestions. - * @param string|int $questionId The subquestion ID. - * @param array $surveyQuestionMapping The question mapping. It needs to have a subquestion_mapping key. + * + * @param string|int $questionId The subquestion ID. + * @param array $surveyQuestionMapping The question mapping. It needs to have a subquestion_mapping key. * @return array */ public function getSubquestionMapping(string|int $questionId, array $surveyQuestionMapping): array