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

AbstractFile   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 50
ccs 14
cts 14
cp 1
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getPath() 0 4 1
A setPath() 0 4 1
A getRawContent() 0 4 1
A setRawContent() 0 4 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