original_string: public function on($event, callable $fn) {
          if (!isset($this->events[$event])) {
              $this->events[$event] = [];
          }
          $this->events[$event][] = $fn;
          return $this;
      }
code: public function on($event, callable $fn) {
          if (!isset($this->events[$event])) {
              $this->events[$event] = [];
          }
          $this->events[$event][] = $fn;
          return $this;
      }
code_tokens: public function on ( $ event , callable $ fn ) { if ( ! isset ( $ this -> events [ $ event ] ) ) { $ this -> events [ $ event ] = [ ] ; } $ this -> events [ $ event ] [ ] = $ fn ; return $ this ; }
docstring: Set an action to do on the specified event
  
  @param int $event event code
  @param callable $fn function to call when the event is triggered
  @return TcTable
docstring_tokens: Set an action to do on the specified event