|
23 | 23 | protected $helper; |
24 | 24 | protected $input; |
25 | 25 |
|
26 | | - protected static $types = array('error', 'success', 'info', 'comment', 'link', 'header', 'mark'); |
| 26 | + protected static $types = array('error', 'warning', 'success', 'info', 'comment', 'link', 'header', 'mark'); |
27 | 27 |
|
28 | 28 | /** |
29 | 29 | * Construct WsTools |
@@ -51,6 +51,9 @@ public function __construct(OutputInterface $output) { |
51 | 51 |
|
52 | 52 | $style = new OutputFormatterStyle('blue', 'white', array('reverse')); |
53 | 53 | $output->getFormatter()->setStyle('mark', $style); |
| 54 | + |
| 55 | + $style = new OutputFormatterStyle('yellow', null, array('bold')); |
| 56 | + $output->getFormatter()->setStyle('warning', $style); |
54 | 57 | } |
55 | 58 |
|
56 | 59 | /** |
@@ -167,6 +170,17 @@ public function writeErrorAndExit($string) { |
167 | 170 | public function writeComment($string, $write = true) { |
168 | 171 | return $this->write($string, 'comment', $write); |
169 | 172 | } |
| 173 | + |
| 174 | + /** |
| 175 | + * Simple method for coloring warning output |
| 176 | + * |
| 177 | + * @param string $string |
| 178 | + * @param boolean $write |
| 179 | + * @return tinted string |
| 180 | + */ |
| 181 | + public function writeWarning($string, $write = true) { |
| 182 | + return $this->write($string, 'warning', $write); |
| 183 | + } |
170 | 184 |
|
171 | 185 | /** |
172 | 186 | * Simple method for coloring info output |
|
0 commit comments