From 5dea14a5e8d790a64e1f959a9e55e414eba2feb5 Mon Sep 17 00:00:00 2001 From: DahmaneYanis Date: Mon, 8 Jan 2024 12:29:26 +0100 Subject: [PATCH] Correction error --- src/Core/Gateway/TeamGateway.php | 2 +- src/Core/Model/TacticModel.php | 6 +++++- src/Core/Model/TeamModel.php | 8 +++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/Core/Gateway/TeamGateway.php b/src/Core/Gateway/TeamGateway.php index c72649e..c5cc115 100644 --- a/src/Core/Gateway/TeamGateway.php +++ b/src/Core/Gateway/TeamGateway.php @@ -85,7 +85,7 @@ class TeamGateway { * Undocumented function * * @param integer $user - * @return array + * @return array> */ public function getAll(int $user): array { return $this->con->fetch("SELECT * FROM Team", []); diff --git a/src/Core/Model/TacticModel.php b/src/Core/Model/TacticModel.php index ececb66..7057e7f 100644 --- a/src/Core/Model/TacticModel.php +++ b/src/Core/Model/TacticModel.php @@ -61,6 +61,10 @@ class TacticModel { /** * Return the nb last tactics + * + * @param integer $nb + * @param integer $ownerId + * @return array> */ public function getLast(int $nb, int $ownerId): array { return $this->tactics->getLast($nb, $ownerId); @@ -70,7 +74,7 @@ class TacticModel { * Get all the tactics of the owner * * @param integer $ownerId - * @return array|null + * @return array> */ public function getAll(int $ownerId): ?array { return $this->tactics->getAll($ownerId); diff --git a/src/Core/Model/TeamModel.php b/src/Core/Model/TeamModel.php index 3357553..3d5ade4 100644 --- a/src/Core/Model/TeamModel.php +++ b/src/Core/Model/TeamModel.php @@ -79,7 +79,13 @@ class TeamModel { return $teamId; } - public function getAll(int $user) { + /** + * Get all user's teams + * + * @param integer $user + * @return array> + */ + public function getAll(int $user) : array { return $this->teams->getAll($user); }