chore: cleanup, add PHPStan type annotations

This commit is contained in:
Björn Fromme
2026-04-03 13:45:41 +02:00
parent a264526127
commit fce6d1615a
14 changed files with 91 additions and 41 deletions
+3 -1
View File
@@ -15,6 +15,8 @@ use Symfony\Component\Security\Core\Authorization\Voter\Voter;
* Enforces ownership check via personId matching. VIEW access requires ownership,
* EDIT access additionally requires the booking to be in an editable state
* (determined by booking.isEditable()).
*
* @extends Voter<string, mixed>
*/
class BookingVoter extends Voter
{
@@ -32,7 +34,7 @@ class BookingVoter extends Voter
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
{
/** @var User $user */
/** @var User|null $user */
$user = $token->getUser();
if (null === $user) {