Add types to the ApiController

This commit is contained in:
ErickSkrauch 2021-06-13 21:28:13 +02:00
parent 202099bf84
commit f69ebf8221
No known key found for this signature in database
GPG Key ID: 669339FCBB30EE0E

View File

@ -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) {