src/Identity/Voter/EnabledVoter.php
protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
    {
        $user = $token->getUser();

        if (!$user instanceof User) {
            return false;
        }

        if (in_array($user->getIdentity()->getType(), [Identity::SYSTEM, Identity::STAFF], true)) {
            return true;
        }

        if ($subject->getEnabled()) {
            return true;
        }

        return false;
    }
protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
    {
        $user = $token->getUser();

        if (!$user instanceof User) {
            return false;
        }

        if (in_array($user->getIdentity()->getType(), [Identity::SYSTEM, Identity::STAFF], true)) {
            return true;
        }

        if ($subject->getEnabled()) {
            return true;
        }

        return false;
    }
protected function voteOnAttribute ( $ attribute , $ subject , TokenInterface $ token ) { $ user = $ token -> getUser ( ) ; if ( ! $ user instanceof User ) { return false ; } if ( in_array ( $ user -> getIdentity ( ) -> getType ( ) , [ Identity :: SYSTEM , Identity :: STAFF ] , true ) ) { return true ; } if ( $ subject -> getEnabled ( ) ) { return true ; } return false ; }
{@inheritdoc}
{