Identity/IdentityUtils.php
public static function isValid(SecurityIdentityInterface $sid)
    {
        return !$sid instanceof RoleSecurityIdentity
            || ($sid instanceof RoleSecurityIdentity && false === strpos($sid->getIdentifier(), 'IS_'));
    }
public static function isValid(SecurityIdentityInterface $sid)
    {
        return !$sid instanceof RoleSecurityIdentity
            || ($sid instanceof RoleSecurityIdentity && false === strpos($sid->getIdentifier(), 'IS_'));
    }
public static function isValid ( SecurityIdentityInterface $ sid ) { return ! $ sid instanceof RoleSecurityIdentity || ( $ sid instanceof RoleSecurityIdentity && false === strpos ( $ sid -> getIdentifier ( ) , 'IS_' ) ) ; }
Check if the security identity is valid.

@param SecurityIdentityInterface $sid The security identity

@return bool
Check if the security identity is valid .