AbstractFile   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 55
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 55
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
    /**
20
     * AbstractFile constructor.
21
     * @param string $path
22
     * @param string $content
23
     */
24 1
    public function __construct(string $path, string $content = '')
25
    {
26 1
        $this->path = $path;
27 1
        $this->rawContent = $content;
28 1
    }
29
30
    /**
31
     * @return string
32
     */
33 1
    public function getPath(): string
34
    {
35 1
        return $this->path;
36
    }
37
38
    /**
39
     * @param string $path
40
     */
41 1
    public function setPath(string $path)
42
    {
43 1
        $this->path = $path;
44 1
    }
45
46
    /**
47
     * @return string
48
     */
49 1
    public function getRawContent(): string
50
    {
51 1
        return $this->rawContent;
52
    }
53
54
    /**
55
     * @param string $rawContent
56
     */
57 1
    public function setRawContent(string $rawContent)
58
    {
59 1
        $this->rawContent = $rawContent;
60 1
    }
61
}
62