address review by making $args an array

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L
2023-01-02 15:46:58 +01:00
parent 8089ab83cf
commit f272979c43
4 changed files with 16 additions and 16 deletions

View File

@@ -19,7 +19,7 @@ class LoginController
$this->dockerActionManager = $dockerActionManager;
}
public function TryLogin(Request $request, Response $response, mixed $args) : Response {
public function TryLogin(Request $request, Response $response, array $args) : Response {
if (!$this->dockerActionManager->isLoginAllowed()) {
return $response->withHeader('Location', '/')->withStatus(302);
}
@@ -32,7 +32,7 @@ class LoginController
return $response->withHeader('Location', '/')->withStatus(302);
}
public function GetTryLogin(Request $request, Response $response, mixed $args) : Response {
public function GetTryLogin(Request $request, Response $response, array $args) : Response {
$token = $request->getQueryParams()['token'] ?? '';
if($this->authManager->CheckToken($token)) {
$this->authManager->SetAuthState(true);
@@ -42,7 +42,7 @@ class LoginController
return $response->withHeader('Location', '/')->withStatus(302);
}
public function Logout(Request $request, Response $response, mixed $args) : Response
public function Logout(Request $request, Response $response, array $args) : Response
{
$this->authManager->SetAuthState(false);
return $response