SonarQube code smells resolve #24
continuous-integration/drone/push Build is passing Details

LoginModification
Alexis 2 years ago
parent eeb1f7b552
commit ad69255b81

@ -48,7 +48,7 @@ class GatewayListResponseOfCandidate
{
$gatewayResponse = new GatewayResponse();
foreach ( $gatewayResponse->getResponsesIdByIdListCandidate($id) as $response){
foreach ($gatewayResponse->getResponsesIdByIdListCandidate($id) as $response) {
$gatewayResponse->deleteResponseById($response);
}
@ -71,9 +71,9 @@ class GatewayListResponseOfCandidate
$idListQuestion = $this->connection->lastInsertId();
for($i = 0; $i < count($answer); $i++)
{
$idResponse = $gatewayResponse->insertResponse($gatewayQuestion->getQuestionContentById($id[$i]), $answer[$i], $category[$i]);
for ($i = 0; $i < count($answer); $i++) {
$question = $gatewayQuestion->getQuestionContentById($id[$i]);
$idResponse = $gatewayResponse->insertResponse($question, $answer[$i], $category[$i]);
$query = "INSERT INTO Submit (responsesCandidate, response) VALUES(:responsesCandidate, :response)";
$this->connection->executeQuery($query, array(

@ -16,7 +16,7 @@ class GatewayPossibleResponse
public function getPossibleResponseByQuestion(string $idQuestion): array
{
$query = "SELECT pr.* FROM Propose p, PossibleResponse pr
$query = "SELECT pr.* FROM Propose p, PossibleResponse pr
WHERE p.question = :questionId AND p.possibleResponse = pr.id";
$this->connection->executeQuery($query, array(
':questionId' => array($idQuestion, PDO::PARAM_INT)
@ -34,4 +34,4 @@ class GatewayPossibleResponse
return $this->connection->lastInsertId();
}
}
}

Loading…
Cancel
Save