Skip to content

Commit

Permalink
update submit Question and Answer
Browse files Browse the repository at this point in the history
  • Loading branch information
hieumgz committed Aug 21, 2019
1 parent 9b0ee9d commit 4caed21
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions Model/Resolver/SubmitAnswer.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* version in the future.
*
* @category Ecomteck
* @package Ecomteck_ProductQuestionsGraph
* @package Ecomteck_ProductQuestionsGraphQl
* @copyright Copyright (c) 2019 Ecomteck (https://ecomteck.com/)
* @license https://ecomteck.com/LICENSE.txt
*/
Expand Down Expand Up @@ -43,7 +43,7 @@ class SubmitAnswer implements ResolverInterface
/**
* @var CreateAnswer
*/
private $creatAnswer;
private $createAnswer;

/**
* User Type Model
Expand All @@ -64,18 +64,18 @@ class SubmitAnswer implements ResolverInterface

/**
* SubmitQuestion constructor.
* @param CreateAnswer $creatAnswer
* @param CreateAnswer $createAnswer
* @param UserType $userType
* @param AnswerDataProvider $answerDataProvider
* @param QuestionRepositoryInterface $questionRepository
*/
public function __construct(
CreateAnswer $creatAnswer,
CreateAnswer $createAnswer,
UserType $userType,
AnswerDataProvider $answerDataProvider,
QuestionRepositoryInterface $questionRepository
) {
$this->creatAnswer = $creatAnswer;
$this->createAnswer = $createAnswer;
$this->userType = $userType;
$this->answerDataProvider = $answerDataProvider;
$this->questionRepository = $questionRepository;
Expand Down Expand Up @@ -103,7 +103,7 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value
$data['answer_created_by'] = $userCode;
$data['answer_user_type_id'] = $userCode;

$answer = $this->creatAnswer->execute($data);
$answer = $this->createAnswer->execute($data);
try {
$answerData = $this->answerDataProvider->getData($answer->getId());
} catch (NoSuchEntityException $e) {
Expand Down
12 changes: 6 additions & 6 deletions Model/Resolver/SubmitQuestion.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* version in the future.
*
* @category Ecomteck
* @package Ecomteck_ProductQuestionsGraph
* @package Ecomteck_ProductQuestionsGraphQl
* @copyright Copyright (c) 2019 Ecomteck (https://ecomteck.com/)
* @license https://ecomteck.com/LICENSE.txt
*/
Expand Down Expand Up @@ -48,7 +48,7 @@ class SubmitQuestion implements ResolverInterface
/**
* @var CreateQuestion
*/
private $creatQuestion;
private $createQuestion;

/**
* User Type Model
Expand All @@ -65,18 +65,18 @@ class SubmitQuestion implements ResolverInterface
/**
* SubmitQuestion constructor.
* @param ProductRepositoryInterface $productRepository
* @param CreateQuestion $creatQuestion
* @param CreateQuestion $createQuestion
* @param UserType $userType
* @param QuestionDataProvider $questionDataProvider
*/
public function __construct(
ProductRepositoryInterface $productRepository,
CreateQuestion $creatQuestion,
CreateQuestion $createQuestion,
UserType $userType,
QuestionDataProvider $questionDataProvider
) {
$this->productRepository = $productRepository;
$this->creatQuestion = $creatQuestion;
$this->createQuestion = $createQuestion;
$this->userType = $userType;
$this->questionDataProvider = $questionDataProvider;
}
Expand All @@ -102,7 +102,7 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value
$data['question_created_by'] = $userCode;
$data['question_user_type_id'] = $userCode;

$question = $this->creatQuestion->execute($data);
$question = $this->createQuestion->execute($data);
try {
$questionData = $this->questionDataProvider->getData($question->getId());
} catch (NoSuchEntityException $e) {
Expand Down

0 comments on commit 4caed21

Please sign in to comment.