cdp_stack_trace_leak = SignalParser::parse_bool( $raw, 'cdp_stack_trace_leak' ); $this->cdp_console_debug_leak = SignalParser::parse_bool( $raw, 'cdp_console_debug_leak' ); } /** * Convert to normalized array for storage/logging. * * @since 1.1.0 * * @return array Normalized signals array. */ public function to_array(): array { return [ 'cdp_stack_trace_leak' => $this->cdp_stack_trace_leak, 'cdp_console_debug_leak' => $this->cdp_console_debug_leak, ]; } /** * Convert to minimal API payload. * * @since 1.1.0 * * @return array Payload for API submission. */ public function to_api_payload(): array { return [ 'cdp_stack_trace_leak' => $this->cdp_stack_trace_leak, 'cdp_console_debug_leak' => $this->cdp_console_debug_leak, ]; } /** * Check if CDP stack trace leak was detected. * * @since 1.1.0 * * @return bool True if CDP stack trace leak detected. */ public function has_cdp_stack_trace_leak(): bool { return $this->cdp_stack_trace_leak; } /** * Check if CDP console debug leak was detected. * * @since 1.1.0 * * @return bool True if CDP console debug leak detected. */ public function has_cdp_console_debug_leak(): bool { return $this->cdp_console_debug_leak; } }