From dabe17588a15ecdea2e6e0239f30f957e87f44d2 Mon Sep 17 00:00:00 2001 From: Alexis Date: Tue, 7 Feb 2023 14:08:16 +0100 Subject: [PATCH] SonarQube code smells resolve #20 --- Source/API/script/Gateway/GatewayForm.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Source/API/script/Gateway/GatewayForm.php b/Source/API/script/Gateway/GatewayForm.php index 1154665..6d14881 100644 --- a/Source/API/script/Gateway/GatewayForm.php +++ b/Source/API/script/Gateway/GatewayForm.php @@ -4,7 +4,6 @@ namespace API\script\Gateway; use API\script\Config\Connection; use BusinessClass\Form; -use BusinessClass\Keyword; use BusinessClass\Question; use PDO; @@ -19,8 +18,7 @@ class GatewayForm public function insertForm(Form $form): void { - if(empty($this->getForm())) - { + if(empty($this->getForm())) { $query = "INSERT INTO Form(title, description) VALUES(:title, :description)"; $this->connection->executeQuery($query, array( ':title' => array($form->getTitle(), PDO::PARAM_STR), @@ -47,7 +45,6 @@ class GatewayForm public function assignKeywordToQuestion(string $keyword, string $response, int $idQuestion): void { - echo $keyword; $query = "SELECT pr.id FROM Propose p, PossibleResponse pr WHERE p.question = :id AND p.possibleResponse = pr.id AND pr.content = :response"; $this->connection->executeQuery($query, array( ':id' => array($idQuestion, PDO::PARAM_INT), @@ -106,4 +103,4 @@ class GatewayForm ':id' => array($form->getId(), PDO::PARAM_INT) )); } -} \ No newline at end of file +}