$source, 'operator_name' => (string) ( $bot['operator_name'] ?? '' ), 'domain' => (string) ( $bot['domain'] ?? '' ), 'crawler_ua' => (string) ( $bot['crawler_ua'] ?? '' ), 'ip_ranges' => array_values( array_filter( array_map( 'strval', is_array( $bot['ip_ranges'] ?? null ) ? $bot['ip_ranges'] : [] ) ) ), 'ip_range_verification' => (string) ( $bot['ip_range_verification'] ?? 'unverified' ), 'contact_url' => (string) ( $bot['contact_url'] ?? '' ), ]; } private static function fallback(): array { return [ 'source' => 'unknown', 'operator_name' => '', 'domain' => '', 'crawler_ua' => '', 'ip_ranges' => [], 'ip_range_verification' => 'unverified', 'contact_url' => '', ]; } private static function normalize( string $value ): string { return preg_replace( '/[^a-z0-9]+/', '', strtolower( $value ) ) ?? ''; } }