original_string: protected function prepareWebsocket()
      {
          $config = $this->container->make('config');
          $isWebsocket = $config->get('swoole_http.websocket.enabled');
          $parser = $config->get('swoole_websocket.parser');
  
          if ($isWebsocket) {
              $this->events = array_merge($this->events ?? [], $this->wsEvents);
              $this->isServerWebsocket = true;
              $this->setPayloadParser(new $parser);
          }
      }
code: protected function prepareWebsocket()
      {
          $config = $this->container->make('config');
          $isWebsocket = $config->get('swoole_http.websocket.enabled');
          $parser = $config->get('swoole_websocket.parser');
  
          if ($isWebsocket) {
              $this->events = array_merge($this->events ?? [], $this->wsEvents);
              $this->isServerWebsocket = true;
              $this->setPayloadParser(new $parser);
          }
      }
code_tokens: protected function prepareWebsocket ( ) { $ config = $ this -> container -> make ( 'config' ) ; $ isWebsocket = $ config -> get ( 'swoole_http.websocket.enabled' ) ; $ parser = $ config -> get ( 'swoole_websocket.parser' ) ; if ( $ isWebsocket ) { $ this -> events = array_merge ( $ this -> events ?? [ ] , $ this -> wsEvents ) ; $ this -> isServerWebsocket = true ; $ this -> setPayloadParser ( new $ parser ) ; } }
docstring: Prepare settings if websocket is enabled.
docstring_tokens: Prepare settings if websocket is enabled .