Total Complexity | 4 |
Total Lines | 58 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | abstract class Output |
||
6 | { |
||
7 | /** |
||
8 | * Output verbosity. |
||
9 | * |
||
10 | * @var bool |
||
11 | */ |
||
12 | protected $verbosity = true; |
||
13 | |||
14 | /** |
||
15 | * Write a message. |
||
16 | * |
||
17 | * @param string $message |
||
18 | */ |
||
19 | abstract public function write($message); |
||
20 | |||
21 | /** |
||
22 | * Write an info message. |
||
23 | * |
||
24 | * @param string $message |
||
25 | */ |
||
26 | public function writeInfo($message) |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * Write an error message. |
||
33 | * |
||
34 | * @param string $message |
||
35 | */ |
||
36 | public function writeError($message) |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * Write a comment message. |
||
43 | * |
||
44 | * @param string $message |
||
45 | */ |
||
46 | public function writeComment($message) |
||
47 | { |
||
48 | $this->write("<comment>{$message}</comment>"); |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * Set the output verbosity. |
||
53 | * |
||
54 | * @param bool $verbosity |
||
55 | * |
||
56 | * @return $this |
||
57 | */ |
||
58 | public function setVerbosity($verbosity) |
||
63 | } |
||
64 | } |
||
65 |