Completed
Push — master ( 758742...ec9771 )
by Zach
02:36
created

Output   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 39
rs 10
wmc 3
lcom 1
cbo 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
write() 0 1 ?
A writeInfo() 0 4 1
A writeError() 0 4 1
A writeComment() 0 4 1
1
<?php
2
3
namespace Yarak\Output;
4
5
abstract class Output
6
{
7
    /**
8
     * Write a message.
9
     *
10
     * @param string $message
11
     */
12
    abstract public function write($message);
13
14
    /**
15
     * Write an info message.
16
     *
17
     * @param string $message
18
     */
19
    public function writeInfo($message)
20
    {
21
        $this->write("<info>{$message}</info>");
22
    }
23
24
    /**
25
     * Write an error message.
26
     *
27
     * @param string $message
28
     */
29
    public function writeError($message)
30
    {
31
        $this->write("<error>{$message}</error>");
32
    }
33
34
    /**
35
     * Write a comment message.
36
     *
37
     * @param string $message
38
     */
39
    public function writeComment($message)
40
    {
41
        $this->write("<comment>{$message}</comment>");
42
    }
43
}
44