original_string: public function on($name, $key, Closure $fn = null)
      {
          $name = strtolower($name);
          if ($key instanceof Closure) {
              $this->rules['event'][$name][''] = $key;
          } else {
              $this->rules['event'][$name][$key] = $fn;
          }
          return $this;
      }
code: public function on($name, $key, Closure $fn = null)
      {
          $name = strtolower($name);
          if ($key instanceof Closure) {
              $this->rules['event'][$name][''] = $key;
          } else {
              $this->rules['event'][$name][$key] = $fn;
          }
          return $this;
      }
code_tokens: public function on ( $ name , $ key , Closure $ fn = null ) { $ name = strtolower ( $ name ) ; if ( $ key instanceof Closure ) { $ this -> rules [ 'event' ] [ $ name ] [ '' ] = $ key ; } else { $ this -> rules [ 'event' ] [ $ name ] [ $ key ] = $ fn ; } return $ this ; }
docstring: Adds a rule to handle user event, such as click, subscribe
  
  @param string $name
  @param Closure|string $key
  @param Closure $fn
  @return $this
docstring_tokens: Adds a rule to handle user event such as click subscribe