Completed
Pull Request — master (#13)
by Victor
01:57
created

AbstractFile::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
crap 1
1
<?php
2
3
namespace LazyEight\DiTesto;
4
5
use LazyEight\DiTesto\Interfaces\PrintableContentInterface;
6
7
abstract class AbstractFile implements PrintableContentInterface
8
{
9
    /**
10
     * @var string
11
     */
12
    private $path;
13
14
    /**
15
     * @var string
16
     */
17
    private $rawContent;
18
19 1
    public function __construct(string $path, string $content = '')
20
    {
21 1
        $this->path = $path;
22 1
        $this->rawContent = $content;
23 1
    }
24
25
    /**
26
     * @return string
27
     */
28 1
    public function getPath(): string
29
    {
30 1
        return $this->path;
31
    }
32
33
    /**
34
     * @param string $path
35
     */
36 1
    public function setPath(string $path)
37
    {
38 1
        $this->path = $path;
39 1
    }
40
41
    /**
42
     * @return string
43
     */
44 1
    public function getRawContent(): string
45
    {
46 1
        return $this->rawContent;
47
    }
48
49
    /**
50
     * @param string $rawContent
51
     */
52 1
    public function setRawContent(string $rawContent)
53
    {
54 1
        $this->rawContent = $rawContent;
55 1
    }
56
}
57