chore: cleanup, add PHPStan type annotations
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user