Skip to content

Commit

Permalink
[Console] Removed pointless constant.
Browse files Browse the repository at this point in the history
  • Loading branch information
jfsimon committed Jul 10, 2012
1 parent ef83763 commit ebe015d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Formatter/OutputFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ class OutputFormatter implements OutputFormatterInterface
*/
const FORMAT_PATTERN = '#(\\\\?)<(/?)([a-z][a-z0-9_=;-]+)?>([^\\\\<]*)#is';

/**
* The escape sequence for LG char.
*/
const LG_CHAR_ESCAPING = '\\';

private $decorated;
private $styles = array();
private $styleStack;
Expand Down Expand Up @@ -154,7 +149,7 @@ public function format($message)
{
$message = preg_replace_callback(self::FORMAT_PATTERN, array($this, 'replaceStyle'), $message);

return str_replace(self::LG_CHAR_ESCAPING.'<', '<', $message);
return str_replace('\\<', '<', $message);
}

/**
Expand All @@ -167,7 +162,7 @@ public function format($message)
private function replaceStyle($match)
{
// we got "\<" escaped char
if (self::LG_CHAR_ESCAPING === $match[1]) {
if ('\\' === $match[1]) {
return $match[0];
}

Expand Down

0 comments on commit ebe015d

Please sign in to comment.