AccessControl::NO_ACCESS_RESTRICTION, ]; /** @var DaemonHttpRunner */ private $daemonRunner; /** @var CronHelper */ private $cronHelper; public function __construct( DaemonHttpRunner $daemonRunner, CronHelper $cronHelper ) { $this->daemonRunner = $daemonRunner; $this->cronHelper = $cronHelper; } public function run($data) { $this->daemonRunner->run($data); } public function ping() { die(esc_html($this->cronHelper->pingDaemon())); } public function pingResponse() { $this->daemonRunner->ping(); } }