Skip to content

Commit 6d454e8

Browse files
committed
Fixing PHPStan
1 parent 16a9dbd commit 6d454e8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Controller/GraphQL/MeController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function me(): ?UserInterface
3838
return null;
3939
}
4040

41-
$user = $this->tokenStorage->getToken()->getUser();
41+
$user = $token->getUser();
4242

4343
if (!$user instanceof UserInterface) {
4444
// getUser() can be an object with a toString or a string

phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ parameters:
44
# Error triggered by a bad PHPDoc in Symfony
55
- '#Parameter \#4 $roles of class Symfony\\Component\\Security\\Core\\Authentication\\Token\\UsernamePasswordToken constructor expects array<string>, array<string|Symfony\\Component\\Security\\Core\\Role\\Role> given.#'
66
- '#Method Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface::dispatch\(\) invoked with 2 parameters, 1 required.#'
7+
- '#Cannot cast object|string to string.#'
78
#includes:
89
# - vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon

0 commit comments

Comments
 (0)