public function __construct($output)
 {
     if (preg_match(self::MESSAGE_PATTERN, ltrim(SHString::normalizeNewlines($output, SHString::NEWLINE_UNIX)), $matches)) {
         $this->fullMessage = $matches[0];
         $this->message = $matches[1];
         $this->file = $matches[2];
         if (strlen($matches[3]) > 0) {
             $this->line = (int) $matches[3];
         } else {
             $this->line = (int) $matches[4];
         }
     } else {
         $this->fullMessage = $output;
     }
 }
 public function writeAttribute($attribute, $value)
 {
     $this->buffer .= ' ' . $attribute . '="' . str_replace("\n", '
', htmlspecialchars(SHString::normalizeNewlines($value), ENT_QUOTES, 'UTF-8')) . '"';
 }
 /**
  * @param string $result
  * @param string $message
  */
 public function __construct($result, $message)
 {
     $this->result = $result;
     $this->message = str_replace(PHP_EOL, ' ', SHString::normalizeNewlines($message));
 }