Completed
Pull Request — master (#37)
by Alessandro
02:23
created

AbstractOutputContainer   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 45.45%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 56
ccs 5
cts 11
cp 0.4545
rs 10

8 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getTag() 0 4 1
A getTitle() 0 4 1
A getSingleResultMarker() 0 4 1
addToOutputBuffer() 0 1 ?
getFileNames() 0 1 ?
getOutputBuffer() 0 1 ?
countFiles() 0 1 ?
1
<?php
2
3
namespace Paraunit\Output;
4
use Paraunit\Process\ProcessWithResultsInterface;
5
6
/**
7
 * Class AbstractOutputContainer
8
 * @package Paraunit\Output
9
 */
10
abstract class AbstractOutputContainer implements OutputContainerInterface
11
{
12
    /** @var string */
13
    protected $singleResultMarker;
14
15
    /** @var string */
16
    protected $tag;
17
18
    /** @var string */
19
    protected $title;
20
21
    /**
22
     * OutputContainer constructor.
23
     * @param string $tag
24
     * @param string $title
25
     * @param string $singleResultMarker
26
     */
27 11
    public function __construct($tag, $title, $singleResultMarker)
28
    {
29 11
        $this->tag = $tag;
30 11
        $this->title = $title;
31 11
        $this->singleResultMarker = $singleResultMarker;
32 11
    }
33
34
    /**
35
     * @return string
36
     */
37
    public function getTag()
38
    {
39
        return $this->tag;
40
    }
41
42
    /**
43
     * @return string
44
     */
45
    public function getTitle()
46
    {
47
        return $this->title;
48
    }
49
50
    /**
51
     * @return string
52
     */
53
    public function getSingleResultMarker()
54
    {
55
        return $this->singleResultMarker;
56
    }
57
58
    abstract public function addToOutputBuffer(ProcessWithResultsInterface $process, $message);
59
60
    abstract public function getFileNames();
61
62
    abstract public function getOutputBuffer();
63
64
    abstract public function countFiles();
65
}
66