Php cs fixes

This commit is contained in:
2024-07-04 11:39:02 +02:00
parent 428494ca1f
commit 21b79c1981
26 changed files with 133 additions and 80 deletions

View File

@@ -12,7 +12,6 @@ declare(strict_types=1);
namespace Chill\DocStoreBundle\Security\Authorization;
use Chill\DocStoreBundle\AsyncUpload\SignedUrl;
use Chill\DocStoreBundle\Entity\StoredObject;
use Chill\DocStoreBundle\Repository\StoredObjectRepository;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
@@ -41,7 +40,7 @@ final class AsyncUploadVoter extends Voter
$storedObject = $this->storedObjectRepository->findOneBy(['filename' => $subject->object_name]);
return match($subject->method) {
return match ($subject->method) {
'GET' => $this->security->isGranted(StoredObjectRoleEnum::SEE->value, $storedObject),
'PUT' => $this->security->isGranted(StoredObjectRoleEnum::EDIT->value, $storedObject),
default => $this->security->isGranted('ROLE_USER') || $this->security->isGranted('ROLE_ADMIN')