Exemplo n.º 1
0
 public function __construct($output)
 {
     if (preg_match(self::MESSAGE_PATTERN, ltrim(String::normalizeNewlines($output, String::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;
     }
 }
Exemplo n.º 2
0
 /**
  * @param string $result
  * @param string $message
  */
 public function __construct($result, $message)
 {
     $this->result = $result;
     $this->message = str_replace(PHP_EOL, ' ', String::normalizeNewlines($message));
 }
 public function writeAttribute($attribute, $value)
 {
     $this->buffer .= ' ' . $attribute . '="' . str_replace("\n", '
', htmlspecialchars(String::normalizeNewlines($value), ENT_QUOTES, 'UTF-8')) . '"';
 }