Completed
Push — output_parsers_refactor ( d2cb12...a7c18a )
by Alessandro
03:46
created

AbstractOutputContainer::getSingleResultMarker()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Paraunit\Printer;
4
5
/**
6
 * Class AbstractOutputContainer
7
 * @package Paraunit\Printer
8
 */
9
class AbstractOutputContainer
10
{
11
    /** @var string */
12
    protected $singleResultMarker;
13
14
    /** @var string */
15
    protected $tag;
16
17
    /** @var string */
18
    protected $title;
19
20
    /**
21
     * OutputContainer constructor.
22
     * @param string $tag
23
     * @param string $title
24
     * @param string $singleResultMarker
25
     */
26 43
    public function __construct($tag, $title, $singleResultMarker)
27
    {
28 43
        $this->tag = $tag;
29 43
        $this->title = $title;
30 43
        $this->singleResultMarker = $singleResultMarker;
31 43
        $this->outputBuffer = array();
0 ignored issues
show
Bug introduced by
The property outputBuffer does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
32 43
    }
33
34
    /**
35
     * @return string
36
     */
37 17
    public function getTag()
38
    {
39 17
        return $this->tag;
40
    }
41
42
    /**
43
     * @return string
44
     */
45 8
    public function getTitle()
46
    {
47 8
        return $this->title;
48
    }
49
50
    /**
51
     * @return string
52
     */
53 22
    public function getSingleResultMarker()
54
    {
55 22
        return $this->singleResultMarker;
56
    }
57
}
58