Skip to content

Commit 282a493

Browse files
committed
moved the constant from the interface back into the class
1 parent 7ec7fbe commit 282a493

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/Symfony/Component/Console/Formatter/OutputFormatter.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
*/
2121
class OutputFormatter implements OutputFormatterInterface
2222
{
23+
/**
24+
* The pattern to phrase the format.
25+
*/
26+
const FORMAT_PATTERN = '#<([a-z][a-z0-9_=;-]+)>(.*?)</\\1?>#is';
27+
2328
private $decorated;
2429
private $styles = array();
2530

@@ -125,7 +130,7 @@ public function getStyle($name)
125130
*/
126131
public function format($message)
127132
{
128-
return preg_replace_callback(OutputFormatterInterface::FORMAT_PATTERN, array($this, 'replaceStyle'), $message);
133+
return preg_replace_callback(self::FORMAT_PATTERN, array($this, 'replaceStyle'), $message);
129134
}
130135

131136
/**

src/Symfony/Component/Console/Formatter/OutputFormatterInterface.php

-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020
*/
2121
interface OutputFormatterInterface
2222
{
23-
/**
24-
* The pattern to phrase the format.
25-
*/
26-
const FORMAT_PATTERN = '#<([a-z][a-z0-9_=;-]+)>(.*?)</\\1?>#is';
2723

2824
/**
2925
* Sets the decorated flag.

0 commit comments

Comments
 (0)