mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-27 12:18:54 +02:00
Fixed PHPstan issues
This commit is contained in:
parent
6be55d1837
commit
f265b9d19d
5 changed files with 53 additions and 15 deletions
|
@ -411,6 +411,9 @@ class UserSettingsController extends AbstractController
|
|||
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY');
|
||||
|
||||
$token = new ApiToken();
|
||||
if (!$this->getUser() instanceof User) {
|
||||
throw new RuntimeException('This controller only works only for Part-DB User objects!');
|
||||
}
|
||||
$token->setUser($this->getUser());
|
||||
|
||||
$secret = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue