src/Security/Voter/Document/ViewVoter.php line 12
<?phpdeclare(strict_types=1);namespace App\Security\Voter\Document;use App\Data\Document\Document;use App\Data\Office\Office;use App\Security\Voter\HasRoleForSubjectVoter;class ViewVoter extends HasRoleForSubjectVoter{protected function getRequiredRole(): string{return 'OFFICE_DOCUMENT_VIEW';}protected function getSubject(): string{return Document::class;}/*** @param Document $subject*/protected function getOffice($subject): ?Office{return $subject->getPatient()->getOffice();}}