From 5b9096ab35f2cf765700146e7bc34040a27ebfc2 Mon Sep 17 00:00:00 2001 From: DahmaneYanis Date: Wed, 22 Nov 2023 13:31:25 +0100 Subject: [PATCH] Correction CI --- src/Controller/UserController.php | 2 -- src/Gateway/TacticInfoGateway.php | 2 +- src/Model/TacticModel.php | 6 ++++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Controller/UserController.php b/src/Controller/UserController.php index d93a49b..7fe41ed 100644 --- a/src/Controller/UserController.php +++ b/src/Controller/UserController.php @@ -12,13 +12,11 @@ use App\Model\TacticModel; class UserController { private TacticModel $tacticMdl; - private AuthModel $accountMdl; public function __construct() { $con = new Connexion(get_database()); $this->tacticMdl = new TacticModel(new TacticInfoGateway($con)); - $this->accountMdl = new AuthModel(new AuthGateway($con)); } public function home(): HttpResponse { diff --git a/src/Gateway/TacticInfoGateway.php b/src/Gateway/TacticInfoGateway.php index 4806a04..a9ef5cc 100644 --- a/src/Gateway/TacticInfoGateway.php +++ b/src/Gateway/TacticInfoGateway.php @@ -35,7 +35,7 @@ class TacticInfoGateway { * Return the nb last tactics created * * @param integer $nb - * @return array|null + * @return TacticInfo[] */ public function getLast(int $nb) : ?array { $res = $this->con->fetch( diff --git a/src/Model/TacticModel.php b/src/Model/TacticModel.php index d696b11..aeef9bc 100644 --- a/src/Model/TacticModel.php +++ b/src/Model/TacticModel.php @@ -35,6 +35,12 @@ class TacticModel { return $this->tactics->get($id); } + /** + * Return the nb last tactics created + * + * @param integer $nb + * @return TacticInfo[] + */ public function getLast(int $nb) : ?array { return $this->tactics->getLast($nb); }