mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Added declare strict types to all files
This commit is contained in:
parent
bea90a7d94
commit
6a2ff9d153
196 changed files with 685 additions and 360 deletions
|
@ -81,7 +81,7 @@ class UserSettingsController extends AbstractController
|
|||
throw new RuntimeException('You can not remove U2F keys from SAML users!');
|
||||
}
|
||||
|
||||
if (empty($user->getBackupCodes())) {
|
||||
if ($user->getBackupCodes() === []) {
|
||||
$this->addFlash('error', 'tfa_backup.no_codes_enabled');
|
||||
|
||||
throw new RuntimeException('You do not have any backup codes enabled, therefore you can not view them!');
|
||||
|
@ -361,7 +361,7 @@ class UserSettingsController extends AbstractController
|
|||
'attr' => [
|
||||
'class' => 'btn-danger',
|
||||
],
|
||||
'disabled' => empty($user->getBackupCodes()),
|
||||
'disabled' => $user->getBackupCodes() === [],
|
||||
])->getForm();
|
||||
|
||||
$backup_form->handleRequest($request);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue