-
diff --git a/front/views/TeamPanel.tsx b/front/views/TeamPanel.tsx
index fc77915..66826b0 100644
--- a/front/views/TeamPanel.tsx
+++ b/front/views/TeamPanel.tsx
@@ -3,10 +3,10 @@ import { BASE } from "../Constants"
import { Team, TeamInfo, Color, User, Member } from "../model/team/Team"
export default function TeamPanel({
- isCoach,
- team,
- currentUserId,
- }: {
+ isCoach,
+ team,
+ currentUserId,
+}: {
isCoach: boolean
team: Team
currentUserId: number
@@ -81,11 +81,11 @@ function CoachOptions({ id }: { id: number }) {
}
function MembersDisplay({
- members,
- isCoach,
- idTeam,
- currentUserId,
- }: {
+ members,
+ isCoach,
+ idTeam,
+ currentUserId,
+}: {
members: Member[]
isCoach: boolean
idTeam: number
@@ -119,11 +119,11 @@ function MembersDisplay({
}
function MemberDisplay({
- member,
- isCoach,
- idTeam,
- currentUserId,
- }: {
+ member,
+ isCoach,
+ idTeam,
+ currentUserId,
+}: {
member: Member
isCoach: boolean
idTeam: number
@@ -165,4 +165,4 @@ function MemberDisplay({
)}
)
-}
\ No newline at end of file
+}
diff --git a/public/index.php b/public/index.php
index 113e79d..3d49a14 100644
--- a/public/index.php
+++ b/public/index.php
@@ -106,8 +106,8 @@ function getRoutes(): AltoRouter {
$ar->map("GET", "/team/[i:id]/addMember", Action::auth(fn(int $id, SessionHandle $s) => getTeamController()->displayAddMember($id, $s)));
$ar->map("POST", "/team/[i:id]/addMember", Action::auth(fn(int $id, SessionHandle $s) => getTeamController()->addMember($id, $_POST, $s)));
$ar->map("GET", "/team/[i:idTeam]/remove/[i:idMember]", Action::auth(fn(int $idTeam, int $idMember, SessionHandle $s) => getTeamController()->deleteMember($idTeam, $idMember, $s)));
- $ar->map("GET", "/team/[i:id]/edit", Action::auth(fn(int $idTeam,SessionHandle $s) => getTeamController()->displayEditTeam($idTeam,$s)));
- $ar->map("POST", "/team/[i:id]/edit", Action::auth(fn(int $idTeam,SessionHandle $s) => getTeamController()->editTeam($idTeam,$_POST,$s)));
+ $ar->map("GET", "/team/[i:id]/edit", Action::auth(fn(int $idTeam, SessionHandle $s) => getTeamController()->displayEditTeam($idTeam, $s)));
+ $ar->map("POST", "/team/[i:id]/edit", Action::auth(fn(int $idTeam, SessionHandle $s) => getTeamController()->editTeam($idTeam, $_POST, $s)));
return $ar;
@@ -127,4 +127,4 @@ function runMatch($match, MutableSessionHandle $session): HttpResponse {
//this is a global variable
$basePath = get_public_path(__DIR__);
-App::render(runMatch(getRoutes()->match(), PhpSessionHandle::init()), fn() => getTwig());
\ No newline at end of file
+App::render(runMatch(getRoutes()->match(), PhpSessionHandle::init()), fn() => getTwig());
diff --git a/src/Api/Controller/APITacticController.php b/src/Api/Controller/APITacticController.php
index 79e766c..a116add 100644
--- a/src/Api/Controller/APITacticController.php
+++ b/src/Api/Controller/APITacticController.php
@@ -36,7 +36,7 @@ class APITacticController {
"name" => [Validators::lenBetween(1, 50), Validators::nameWithSpaces()],
], function (HttpRequest $request) use ($tactic_id, $account) {
- $failures = $this->model->updateName($tactic_id, $request["name"], $account->getId());
+ $failures = $this->model->updateName($tactic_id, $request["name"], $account->getUser()->getId());
if (!empty($failures)) {
//TODO find a system to handle Unauthorized error codes more easily from failures.
diff --git a/src/App/Controller/TeamController.php b/src/App/Controller/TeamController.php
index 92ecc14..fc78234 100644
--- a/src/App/Controller/TeamController.php
+++ b/src/App/Controller/TeamController.php
@@ -63,8 +63,8 @@ class TeamController {
return ViewHttpResponse::twig('insert_team.html.twig', ['bad_fields' => $badFields]);
}
$teamId = $this->model->createTeam($request['name'], $request['picture'], $request['main_color'], $request['second_color']);
- $this->model->addMember($session->getAccount()->getUser()->getEmail(),$teamId,'COACH');
- return HttpResponse::redirect('/team/'.$teamId);
+ $this->model->addMember($session->getAccount()->getUser()->getEmail(), $teamId, 'COACH');
+ return HttpResponse::redirect('/team/' . $teamId);
}
/**
@@ -92,7 +92,7 @@ class TeamController {
return ViewHttpResponse::twig('list_team_by_name.html.twig', ['bad_field' => $badField]);
}
- $teams = $this->model->listByName($request['name'],$session->getAccount()->getUser()->getId());
+ $teams = $this->model->listByName($request['name'], $session->getAccount()->getUser()->getId());
if (empty($teams)) {
return ViewHttpResponse::twig('display_teams.html.twig', []);
@@ -106,11 +106,11 @@ class TeamController {
* @param SessionHandle $session
* @return HttpResponse
*/
- public function deleteTeamById(int $id, SessionHandle $session):HttpResponse{
+ public function deleteTeamById(int $id, SessionHandle $session): HttpResponse {
$a = $session->getAccount();
- $ret = $this->model->deleteTeam($a->getUser()->getEmail(),$id);
- if($ret != 0){
- return ViewHttpResponse::twig('display_team.html.twig',['notDeleted' => true]);
+ $ret = $this->model->deleteTeam($a->getUser()->getEmail(), $id);
+ if($ret != 0) {
+ return ViewHttpResponse::twig('display_team.html.twig', ['notDeleted' => true]);
}
return HttpResponse::redirect('/');
}
@@ -122,22 +122,23 @@ class TeamController {
* @return ViewHttpResponse a view that displays given team information
*/
public function displayTeam(int $id, SessionHandle $session): ViewHttpResponse {
- $result = $this->model->getTeam($id,$session->getAccount()->getUser()->getId());
- if($result == null){
+ $result = $this->model->getTeam($id, $session->getAccount()->getUser()->getId());
+ if($result == null) {
return ViewHttpResponse::twig('error.html.twig', [
'failures' => [ValidationFail::unauthorized("Vous n'avez pas accès à cette équipe.")],
], HttpCodes::FORBIDDEN);
- }
- else{
- $role = $this->model->isCoach($id,$session->getAccount()->getUser()->getEmail());
+ } else {
+ $role = $this->model->isCoach($id, $session->getAccount()->getUser()->getEmail());
- return ViewHttpResponse::react('views/TeamPanel.tsx', [
+ return ViewHttpResponse::react(
+ 'views/TeamPanel.tsx',
+ [
'team' => [
"info" => $result->getInfo(),
- "members" => $result->listMembers()
+ "members" => $result->listMembers(),
],
'isCoach' => $role,
- 'currentUserId'=>$session->getAccount()->getUser()->getId()]
+ 'currentUserId' => $session->getAccount()->getUser()->getId()]
);
}
}
@@ -147,8 +148,8 @@ class TeamController {
* @param SessionHandle $session
* @return ViewHttpResponse the team panel to add a member
*/
- public function displayAddMember(int $idTeam,SessionHandle $session): ViewHttpResponse {
- return ViewHttpResponse::twig("add_member.html.twig", ['idTeam'=> $idTeam]);
+ public function displayAddMember(int $idTeam, SessionHandle $session): ViewHttpResponse {
+ return ViewHttpResponse::twig("add_member.html.twig", ['idTeam' => $idTeam]);
}
/**
@@ -158,9 +159,9 @@ class TeamController {
* @param SessionHandle $session
* @return HttpResponse
*/
- public function addMember(int $idTeam,array $request, SessionHandle $session): HttpResponse {
+ public function addMember(int $idTeam, array $request, SessionHandle $session): HttpResponse {
$errors = [];
- if(!$this->model->isCoach($idTeam,$session->getAccount()->getUser()->getEmail())){
+ if(!$this->model->isCoach($idTeam, $session->getAccount()->getUser()->getEmail())) {
return ViewHttpResponse::twig('error.html.twig', [
'failures' => [ValidationFail::unauthorized("Vous n'avez pas accès à cette action pour cette équipe.")],
], HttpCodes::FORBIDDEN);
@@ -168,18 +169,18 @@ class TeamController {
$request = HttpRequest::from($request, $errors, [
"email" => [Validators::email(), Validators::lenBetween(5, 256)],
]);
- if(!empty($errors)){
- return ViewHttpResponse::twig('add_member.html.twig',['badEmail' => true,'idTeam'=> $idTeam]);
+ if(!empty($errors)) {
+ return ViewHttpResponse::twig('add_member.html.twig', ['badEmail' => true,'idTeam' => $idTeam]);
}
$ret = $this->model->addMember($request['email'], $idTeam, $request['role']);
- switch($ret){
+ switch($ret) {
case -1:
- return ViewHttpResponse::twig('add_member.html.twig',['notFound' => true,'idTeam'=> $idTeam]);
+ return ViewHttpResponse::twig('add_member.html.twig', ['notFound' => true,'idTeam' => $idTeam]);
case -2:
- return ViewHttpResponse::twig('add_member.html.twig',['alreadyExisting' => true,'idTeam'=> $idTeam]);
+ return ViewHttpResponse::twig('add_member.html.twig', ['alreadyExisting' => true,'idTeam' => $idTeam]);
default:
- return HttpResponse::redirect('/team/'.$idTeam);
+ return HttpResponse::redirect('/team/' . $idTeam);
}
}
@@ -190,17 +191,17 @@ class TeamController {
* @param SessionHandle $session
* @return HttpResponse
*/
- public function deleteMember(int $idTeam,int $idMember, SessionHandle $session): HttpResponse {
- if(!$this->model->isCoach($idTeam,$session->getAccount()->getUser()->getEmail())){
+ public function deleteMember(int $idTeam, int $idMember, SessionHandle $session): HttpResponse {
+ if(!$this->model->isCoach($idTeam, $session->getAccount()->getUser()->getEmail())) {
return ViewHttpResponse::twig('error.html.twig', [
'failures' => [ValidationFail::unauthorized("Vous n'avez pas accès à cette action pour cette équipe.")],
], HttpCodes::FORBIDDEN);
}
- $teamId = $this->model->deleteMember($idMember,$idTeam);
- if($teamId == -1 || $session->getAccount()->getUser()->getId() == $idMember ){
+ $teamId = $this->model->deleteMember($idMember, $idTeam);
+ if($teamId == -1 || $session->getAccount()->getUser()->getId() == $idMember) {
return HttpResponse::redirect('/');
}
- return $this->displayTeam($teamId,$session);
+ return $this->displayTeam($teamId, $session);
}
/**
@@ -208,18 +209,18 @@ class TeamController {
* @param SessionHandle $session
* @return ViewHttpResponse
*/
- public function displayEditTeam(int $idTeam,SessionHandle $session): ViewHttpResponse {
- return ViewHttpResponse::twig("edit_team.html.twig", ['team' => $this->model->getTeam($idTeam,$session->getAccount()->getUser()->getId())]);
+ public function displayEditTeam(int $idTeam, SessionHandle $session): ViewHttpResponse {
+ return ViewHttpResponse::twig("edit_team.html.twig", ['team' => $this->model->getTeam($idTeam, $session->getAccount()->getUser()->getId())]);
}
/**
* @param int $idTeam
- * @param array $request
+ * @param array
$request
* @param SessionHandle $session
* @return HttpResponse
*/
- public function editTeam(int $idTeam,array $request,SessionHandle $session): HttpResponse{
- if(!$this->model->isCoach($idTeam,$session->getAccount()->getUser()->getEmail())){
+ public function editTeam(int $idTeam, array $request, SessionHandle $session): HttpResponse {
+ if(!$this->model->isCoach($idTeam, $session->getAccount()->getUser()->getEmail())) {
return ViewHttpResponse::twig('error.html.twig', [
'failures' => [ValidationFail::unauthorized("Vous n'avez pas accès à cette action pour cette équipe.")],
], HttpCodes::FORBIDDEN);
@@ -240,7 +241,7 @@ class TeamController {
}
return ViewHttpResponse::twig('edit_team.html.twig', ['bad_fields' => $badFields]);
}
- $this->model->editTeam($idTeam,$request['name'], $request['picture'], $request['main_color'], $request['second_color']);
- return HttpResponse::redirect('/team/'.$idTeam);
+ $this->model->editTeam($idTeam, $request['name'], $request['picture'], $request['main_color'], $request['second_color']);
+ return HttpResponse::redirect('/team/' . $idTeam);
}
}
diff --git a/src/Core/Data/Account.php b/src/Core/Data/Account.php
index 01be656..01f5406 100755
--- a/src/Core/Data/Account.php
+++ b/src/Core/Data/Account.php
@@ -8,7 +8,6 @@ namespace IQBall\Core\Data;
* to share to other users, or non-needed public information
*/
class Account {
-
/**
* @var string string token
*/
diff --git a/src/Core/Data/Member.php b/src/Core/Data/Member.php
index 37f8f04..30e4202 100755
--- a/src/Core/Data/Member.php
+++ b/src/Core/Data/Member.php
@@ -6,7 +6,6 @@ namespace IQBall\Core\Data;
* information about a team member
*/
class Member implements \JsonSerializable {
-
private User $user;
/**
diff --git a/src/Core/Data/User.php b/src/Core/Data/User.php
index b1fdd22..71e0dd1 100644
--- a/src/Core/Data/User.php
+++ b/src/Core/Data/User.php
@@ -5,7 +5,6 @@ namespace IQBall\Core\Data;
use _PHPStan_4c4f22f13\Nette\Utils\Json;
class User implements \JsonSerializable {
-
/**
* @var string $email user's mail address
*/
@@ -70,4 +69,4 @@ class User implements \JsonSerializable {
public function jsonSerialize() {
return get_object_vars($this);
}
-}
\ No newline at end of file
+}
diff --git a/src/Core/Gateway/AccountGateway.php b/src/Core/Gateway/AccountGateway.php
index 1d109d0..a9c3e18 100644
--- a/src/Core/Gateway/AccountGateway.php
+++ b/src/Core/Gateway/AccountGateway.php
@@ -17,13 +17,13 @@ class AccountGateway {
$this->con = $con;
}
- public function insertAccount(string $name, string $email, string $token, string $hash,string $profilePicture): int {
+ public function insertAccount(string $name, string $email, string $token, string $hash, string $profilePicture): int {
$this->con->exec("INSERT INTO Account(username, hash, email, token,profilePicture) VALUES (:username,:hash,:email,:token,:profilePic)", [
':username' => [$name, PDO::PARAM_STR],
':hash' => [$hash, PDO::PARAM_STR],
':email' => [$email, PDO::PARAM_STR],
':token' => [$token, PDO::PARAM_STR],
- ':profilePic' => [$profilePicture, PDO::PARAM_STR]
+ ':profilePic' => [$profilePicture, PDO::PARAM_STR],
]);
return intval($this->con->lastInsertId());
}
@@ -66,7 +66,7 @@ class AccountGateway {
return null;
}
- return new Account($acc["token"],new User($email,$acc["username"],$acc["id"],$acc["profilePicture"]));
+ return new Account($acc["token"], new User($email, $acc["username"], $acc["id"], $acc["profilePicture"]));
}
/**
@@ -79,7 +79,7 @@ class AccountGateway {
return null;
}
- return new Account($acc["token"],new User($acc["email"],$acc["username"],$acc["id"],$acc["profilePicture"]));
+ return new Account($acc["token"], new User($acc["email"], $acc["username"], $acc["id"], $acc["profilePicture"]));
}
diff --git a/src/Core/Gateway/MemberGateway.php b/src/Core/Gateway/MemberGateway.php
index aeb2042..a5116e8 100644
--- a/src/Core/Gateway/MemberGateway.php
+++ b/src/Core/Gateway/MemberGateway.php
@@ -46,7 +46,7 @@ class MemberGateway {
":id" => [$teamId, PDO::PARAM_INT],
]
);
- return array_map(fn($row) => new Member(new User($row['email'],$row['username'],$row['id'],$row['profilePicture']), $teamId, $row['role']),$rows);
+ return array_map(fn($row) => new Member(new User($row['email'], $row['username'], $row['id'], $row['profilePicture']), $teamId, $row['role']), $rows);
}
/**
@@ -72,12 +72,12 @@ class MemberGateway {
*/
public function isCoach(string $email, int $idTeam): bool {
$result = $this->con->fetch(
- "SELECT role FROM Member WHERE id_team=:team AND id_user = (SELECT id FROM Account WHERE email=:email)",
- [
+ "SELECT role FROM Member WHERE id_team=:team AND id_user = (SELECT id FROM Account WHERE email=:email)",
+ [
"team" => [$idTeam, PDO::PARAM_INT],
- "email" => [$email, PDO::PARAM_STR]
+ "email" => [$email, PDO::PARAM_STR],
]
- )[0]['role'];
+ )[0]['role'];
return $result == 'COACH';
}
@@ -87,14 +87,14 @@ class MemberGateway {
* @param int $idCurrentUser
* @return bool
*/
- public function isMemberOfTeam(int $idTeam,int $idCurrentUser): bool {
+ public function isMemberOfTeam(int $idTeam, int $idCurrentUser): bool {
$result = $this->con->fetch(
"SELECT id_user FROM Member WHERE id_team = :team AND id_user = :user",
- [
+ [
"team" => [$idTeam, PDO::PARAM_INT],
- "user" => [$idCurrentUser, PDO::PARAM_INT]
+ "user" => [$idCurrentUser, PDO::PARAM_INT],
]
- );
+ );
return !empty($result);
}
}
diff --git a/src/Core/Gateway/TeamGateway.php b/src/Core/Gateway/TeamGateway.php
index 601fe25..9804e6b 100644
--- a/src/Core/Gateway/TeamGateway.php
+++ b/src/Core/Gateway/TeamGateway.php
@@ -39,12 +39,12 @@ class TeamGateway {
* @param int $id
* @return TeamInfo[]
*/
- public function listByName(string $name,int $id): array {
+ public function listByName(string $name, int $id): array {
$result = $this->con->fetch(
"SELECT t.* FROM team t, Member m WHERE t.name LIKE '%' || :name || '%' AND t.id=m.id_team AND m.id_user=:id",
[
":name" => [$name, PDO::PARAM_STR],
- "id" => [$id, PDO::PARAM_INT]
+ "id" => [$id, PDO::PARAM_INT],
]
);
return array_map(fn($row) => new TeamInfo($row['id'], $row['name'], $row['picture'], Color::from($row['main_color']), Color::from($row['second_color'])), $result);
@@ -56,11 +56,11 @@ class TeamGateway {
*/
public function getTeamById(int $id): ?TeamInfo {
$row = $this->con->fetch(
- "SELECT * FROM team WHERE id = :id",
- [
+ "SELECT * FROM team WHERE id = :id",
+ [
":id" => [$id, PDO::PARAM_INT],
]
- )[0] ?? null;
+ )[0] ?? null;
if ($row == null) {
return null;
}
@@ -73,11 +73,11 @@ class TeamGateway {
*/
public function getTeamIdByName(string $name): ?int {
return $this->con->fetch(
- "SELECT id FROM team WHERE name = :name",
- [
+ "SELECT id FROM team WHERE name = :name",
+ [
":name" => [$name, PDO::PARAM_INT],
]
- )[0]['id'] ?? null;
+ )[0]['id'] ?? null;
}
/**
@@ -87,13 +87,13 @@ class TeamGateway {
$this->con->exec(
"DELETE FROM Member WHERE id_team=:team",
[
- "team" => [$idTeam, PDO::PARAM_INT]
+ "team" => [$idTeam, PDO::PARAM_INT],
]
);
$this->con->exec(
"DELETE FROM TEAM WHERE id=:team",
[
- "team" => [$idTeam, PDO::PARAM_INT]
+ "team" => [$idTeam, PDO::PARAM_INT],
]
);
}
@@ -106,7 +106,7 @@ class TeamGateway {
* @param string $newSecondColor
* @return void
*/
- public function editTeam(int $idTeam,string $newName,string $newPicture, string $newMainColor, string $newSecondColor){
+ public function editTeam(int $idTeam, string $newName, string $newPicture, string $newMainColor, string $newSecondColor) {
$this->con->exec(
"UPDATE team
SET name = :newName,
diff --git a/src/Core/Model/AuthModel.php b/src/Core/Model/AuthModel.php
index dcf1a66..bc29248 100644
--- a/src/Core/Model/AuthModel.php
+++ b/src/Core/Model/AuthModel.php
@@ -46,8 +46,8 @@ class AuthModel {
$hash = password_hash($password, PASSWORD_DEFAULT);
$token = $this->generateToken();
- $accountId = $this->gateway->insertAccount($username, $email, $token, $hash,self::DEFAULT_PROFILE_PICTURE);
- return new Account($token,new User($email,$username,$accountId,self::DEFAULT_PROFILE_PICTURE));
+ $accountId = $this->gateway->insertAccount($username, $email, $token, $hash, self::DEFAULT_PROFILE_PICTURE);
+ return new Account($token, new User($email, $username, $accountId, self::DEFAULT_PROFILE_PICTURE));
}
/**
@@ -68,7 +68,7 @@ class AuthModel {
public function login(string $email, string $password, array &$failures): ?Account {
$hash = $this->gateway->getHash($email);
if ($hash == null or (!password_verify($password, $hash))) {
- $failures[] = new ValidationFail("email","Adresse email ou mot de passe invalide");
+ $failures[] = new ValidationFail("email", "Adresse email ou mot de passe invalide");
return null;
}
return $this->gateway->getAccountFromMail($email);
diff --git a/src/Core/Model/TeamModel.php b/src/Core/Model/TeamModel.php
index 6bdd615..9e2821a 100644
--- a/src/Core/Model/TeamModel.php
+++ b/src/Core/Model/TeamModel.php
@@ -46,10 +46,10 @@ class TeamModel {
*/
public function addMember(string $mail, int $teamId, string $role): int {
$user = $this->users->getAccountFromMail($mail);
- if($user == null){
+ if($user == null) {
return -1;
}
- if(!$this->members->isMemberOfTeam($teamId,$user->getUser()->getId())){
+ if(!$this->members->isMemberOfTeam($teamId, $user->getUser()->getId())) {
$this->members->insert($teamId, $user->getUser()->getId(), $role);
return 1;
}
@@ -61,8 +61,8 @@ class TeamModel {
* @param int $id
* @return TeamInfo[]
*/
- public function listByName(string $name,int $id): array {
- return $this->teams->listByName($name,$id);
+ public function listByName(string $name, int $id): array {
+ return $this->teams->listByName($name, $id);
}
/**
@@ -71,7 +71,7 @@ class TeamModel {
* @return Team|null
*/
public function getTeam(int $idTeam, int $idCurrentUser): ?Team {
- if(!$this->members->isMemberOfTeam($idTeam,$idCurrentUser)){
+ if(!$this->members->isMemberOfTeam($idTeam, $idCurrentUser)) {
return null;
}
$teamInfo = $this->teams->getTeamById($idTeam);
@@ -87,7 +87,7 @@ class TeamModel {
*/
public function deleteMember(int $idMember, int $teamId): int {
$this->members->remove($teamId, $idMember);
- if(empty($this->members->getMembersOfTeam($teamId))){
+ if(empty($this->members->getMembersOfTeam($teamId))) {
$this->teams->deleteTeam($teamId);
return -1;
}
@@ -100,8 +100,8 @@ class TeamModel {
* @param int $idTeam
* @return int
*/
- public function deleteTeam(string $email, int $idTeam): int{
- if($this->members->isCoach($email,$idTeam)){
+ public function deleteTeam(string $email, int $idTeam): int {
+ if($this->members->isCoach($email, $idTeam)) {
$this->teams->deleteTeam($idTeam);
return 0;
}
@@ -114,9 +114,9 @@ class TeamModel {
* @param string $email
* @return bool
*/
- public function isCoach(int $idTeam, string $email): bool{
- return $this->members->isCoach($email,$idTeam);
- }
+ public function isCoach(int $idTeam, string $email): bool {
+ return $this->members->isCoach($email, $idTeam);
+ }
/**
* Edit a team with its id, and replace the current attributes with the new ones
@@ -127,8 +127,8 @@ class TeamModel {
* @param string $newSecondColor
* @return void
*/
- public function editTeam(int $idTeam,string $newName,string $newPicture, string $newMainColor, string $newSecondColor){
- $this->teams->editTeam($idTeam,$newName,$newPicture, $newMainColor, $newSecondColor);
- }
+ public function editTeam(int $idTeam, string $newName, string $newPicture, string $newMainColor, string $newSecondColor) {
+ $this->teams->editTeam($idTeam, $newName, $newPicture, $newMainColor, $newSecondColor);
+ }
}