mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-03 05:55:16 +01:00
Improved typing and phpdoc type annotations
This commit is contained in:
@@ -66,7 +66,7 @@ class UserSettingsController extends AbstractController
|
||||
}
|
||||
|
||||
#[Route(path: '/2fa_backup_codes', name: 'show_backup_codes')]
|
||||
public function showBackupCodes()
|
||||
public function showBackupCodes(): Response
|
||||
{
|
||||
$user = $this->getUser();
|
||||
|
||||
@@ -74,7 +74,7 @@ class UserSettingsController extends AbstractController
|
||||
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY');
|
||||
|
||||
if (!$user instanceof User) {
|
||||
return new RuntimeException('This controller only works only for Part-DB User objects!');
|
||||
throw new RuntimeException('This controller only works only for Part-DB User objects!');
|
||||
}
|
||||
|
||||
if ($user->isSamlUser()) {
|
||||
|
||||
Reference in New Issue
Block a user