*/ private $config; /** * @psalm-suppress TooManyTemplateParams * @param ConfigInterface $config */ public function __construct( ConfigInterface $config ) { $this->config = $config; } /** * @param WP_REST_Request $request * @param RequestHandlerInterface $handler * @return WP_REST_Response */ public function process( WP_REST_Request $request, RequestHandlerInterface $handler ): WP_REST_Response { if ( ! is_development() ) { return $handler->handle( $request ); } \TreBiMeteo\log( \get_class( $this->config ), $this->config->toArray() ); return $handler->handle( $request ); } }