/** * Does the given user list this user as a friend? * * @param \Idno\Entities\User $friend * @return bool */ function isFriendOf($friend) { if ($friend instanceof \Idno\Entities\User) { if ($friend->isFriend($this)) { return true; } } return false; }