original_string: public function stop($id, $message, $successful, $prefix = 'RES')
      {
          $trailingEOL = isset($this->started[$id]['out']) || isset($this->started[$id]['err']) ? "\n" : '';
  
          if ($successful) {
              return sprintf("%s%s<bg=green;fg=white> %s </> <fg=green>%s</>\n", $trailingEOL, $this->getBorder($id), $prefix, $message);
          }
  
          $message = sprintf("%s%s<bg=red;fg=white> %s </> <fg=red>%s</>\n", $trailingEOL, $this->getBorder($id), $prefix, $message);
  
          unset($this->started[$id]['out'], $this->started[$id]['err']);
  
          return $message;
      }
code: public function stop($id, $message, $successful, $prefix = 'RES')
      {
          $trailingEOL = isset($this->started[$id]['out']) || isset($this->started[$id]['err']) ? "\n" : '';
  
          if ($successful) {
              return sprintf("%s%s<bg=green;fg=white> %s </> <fg=green>%s</>\n", $trailingEOL, $this->getBorder($id), $prefix, $message);
          }
  
          $message = sprintf("%s%s<bg=red;fg=white> %s </> <fg=red>%s</>\n", $trailingEOL, $this->getBorder($id), $prefix, $message);
  
          unset($this->started[$id]['out'], $this->started[$id]['err']);
  
          return $message;
      }
code_tokens: public function stop ( $ id , $ message , $ successful , $ prefix = 'RES' ) { $ trailingEOL = isset ( $ this -> started [ $ id ] [ 'out' ] ) || isset ( $ this -> started [ $ id ] [ 'err' ] ) ? "\n" : '' ; if ( $ successful ) { return sprintf ( "%s%s<bg=green;fg=white> %s </> <fg=green>%s</>\n" , $ trailingEOL , $ this -> getBorder ( $ id ) , $ prefix , $ message ) ; } $ message = sprintf ( "%s%s<bg=red;fg=white> %s </> <fg=red>%s</>\n" , $ trailingEOL , $ this -> getBorder ( $ id ) , $ prefix , $ message ) ; unset ( $ this -> started [ $ id ] [ 'out' ] , $ this -> started [ $ id ] [ 'err' ] ) ; return $ message ; }
docstring: Stops a formatting session.
  
  @param string $id         The id of the formatting session
  @param string $message    The message to display
  @param bool   $successful Whether to consider the result as success
  @param string $prefix     The prefix for the end output
  
  @return string
docstring_tokens: Stops a formatting session .