public function isEqualTo(BaseUserInterface $user): bool
    {
        if ($user instanceof self && $this->apiUser instanceof APIUser) {
            return $user->getAPIUser()->id === $this->apiUser->id;
        }

        return false;
    }
public function isEqualTo(BaseUserInterface $user): bool
    {
        if ($user instanceof self && $this->apiUser instanceof APIUser) {
            return $user->getAPIUser()->id === $this->apiUser->id;
        }

        return false;
    }
public function isEqualTo ( BaseUserInterface $ user ) : bool { if ( $ user instanceof self && $ this -> apiUser instanceof APIUser ) { return $ user -> getAPIUser ( ) -> id === $ this -> apiUser -> id ; } return false ; }
Compares the users.

@param \Symfony\Component\Security\Core\User\UserInterface $user

@return bool
Compares the users .