:` * with non-empty method and identifier parts. */ public static function isValid(string $did): bool { if (!str_starts_with($did, self::PREFIX)) { return false; } $parts = explode(':', $did, 3); if (count($parts) !== 3) { return false; } return $parts[1] !== '' && $parts[2] !== ''; } }