booleanUtils = $booleanUtils; $this->cookieReader = $cookieReader; } /** * @return bool */ public function execute(): bool { $status = $this->cookieReader->getCookie(self::COOKIE_NAME); return $status && $this->booleanUtils->toBoolean($status); } }