From f69ebf82217d04a0aeb282323257c919a76ca561 Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Sun, 13 Jun 2021 21:28:13 +0200 Subject: [PATCH] Add types to the ApiController --- api/modules/mojang/controllers/ApiController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/modules/mojang/controllers/ApiController.php b/api/modules/mojang/controllers/ApiController.php index 7594d6e..10c14c2 100644 --- a/api/modules/mojang/controllers/ApiController.php +++ b/api/modules/mojang/controllers/ApiController.php @@ -27,7 +27,7 @@ class ApiController extends Controller { ]); } - public function actionUuidByUsername($username, $at = null) { + public function actionUuidByUsername(string $username, int $at = null) { if ($at !== null) { /** @var UsernameHistory|null $record */ $record = UsernameHistory::find() @@ -61,7 +61,7 @@ class ApiController extends Controller { ]; } - public function actionUsernamesByUuid($uuid) { + public function actionUsernamesByUuid(string $uuid) { try { $uuid = Uuid::fromString($uuid)->toString(); } catch (\InvalidArgumentException $e) {