Authorization/Voter/AbstractIdentityVoter.php
protected function isValidIdentity($attribute, SecurityIdentityInterface $sid)
    {
        return ($this->getValidType() === $sid->getType() || \in_array($this->getValidType(), class_implements($sid->getType()), true))
            && substr($attribute, \strlen($this->prefix)) === OrganizationalUtil::format($sid->getIdentifier());
    }
protected function isValidIdentity($attribute, SecurityIdentityInterface $sid)
    {
        return ($this->getValidType() === $sid->getType() || \in_array($this->getValidType(), class_implements($sid->getType()), true))
            && substr($attribute, \strlen($this->prefix)) === OrganizationalUtil::format($sid->getIdentifier());
    }
protected function isValidIdentity ( $ attribute , SecurityIdentityInterface $ sid ) { return ( $ this -> getValidType ( ) === $ sid -> getType ( ) || \ in_array ( $ this -> getValidType ( ) , class_implements ( $ sid -> getType ( ) ) , true ) ) && substr ( $ attribute , \ strlen ( $ this -> prefix ) ) === OrganizationalUtil :: format ( $ sid -> getIdentifier ( ) ) ; }
Check if the security identity is valid for this voter.

@param string                    $attribute The attribute
@param SecurityIdentityInterface $sid       The security identity

@return bool
Check if the security identity is valid for this voter .