Completed
Push — master ( 3ebcb1...9e4cf7 )
by personal
16s queued 11s
created

TestOutput   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 47
rs 10
c 0
b 0
f 0
wmc 5
lcom 2
cbo 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A writeln() 0 5 1
A write() 0 5 1
A err() 0 5 1
A clearln() 0 3 1
A hasAnsi() 0 4 1
1
<?php
2
3
/*
4
 * (c) Jean-François Lépine <https://twitter.com/Halleck45>
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace Hal\Component\Output;
11
12
/**
13
 * @package Hal\Component\Issue
14
 */
15
class TestOutput implements Output
16
{
17
    public $output;
18
    public $err;
19
20
    /**
21
     * @inheritdoc
22
     */
23
    public function writeln($message)
24
    {
25
        $this->write(PHP_EOL . $message);
26
        return $this;
27
    }
28
29
    /**
30
     * @inheritdoc
31
     */
32
    public function write($message)
33
    {
34
        $this->output .= $message;
35
        return $this;
36
    }
37
38
    /**
39
     * @inheritdoc
40
     */
41
    public function err($message)
42
    {
43
        $this->err .= $message;
44
        return $this;
45
    }
46
47
    /**
48
     * @inheritdoc
49
     */
50
    public function clearln()
51
    {
52
    }
53
54
    /**
55
     * @inheritdoc
56
     */
57
    public function hasAnsi()
58
    {
59
        return false;
60
    }
61
}
62