1, self::ADMIN => 2, self::OWNER => 3, }; } public function lt(Role|string $role): bool { if (is_string($role)) { $role = Role::from($role); } return $this->rank() < $role->rank(); } public function gt(Role|string $role): bool { if (is_string($role)) { $role = Role::from($role); } return $this->rank() > $role->rank(); } }