original_string: public function signalToEvent($signal) {
  
          if ( $this->pid == ProcessTools::getPid() ) {
  
              $signame = $this->signals->signame($signal);
  
              $this->logger->debug("Received $signame ($signal) signal, firing associated event(s)");
  
              $this->events->emit(new PosixEvent($signal, $this));
              $this->events->emit(new PosixEvent($signame, $this));
  
          }
  
          return $this;
  
      }
code: public function signalToEvent($signal) {
  
          if ( $this->pid == ProcessTools::getPid() ) {
  
              $signame = $this->signals->signame($signal);
  
              $this->logger->debug("Received $signame ($signal) signal, firing associated event(s)");
  
              $this->events->emit(new PosixEvent($signal, $this));
              $this->events->emit(new PosixEvent($signame, $this));
  
          }
  
          return $this;
  
      }
code_tokens: public function signalToEvent ( $ signal ) { if ( $ this -> pid == ProcessTools :: getPid ( ) ) { $ signame = $ this -> signals -> signame ( $ signal ) ; $ this -> logger -> debug ( "Received $signame ($signal) signal, firing associated event(s)" ) ; $ this -> events -> emit ( new PosixEvent ( $ signal , $ this ) ) ; $ this -> events -> emit ( new PosixEvent ( $ signame , $ this ) ) ; } return $ this ; }
docstring: The generic signal handler.
  
  It transforms a signal into framework catchable event.
  
  @param int $signal
  @return self
docstring_tokens: The generic signal handler .