AbstractFileParser::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
ccs 0
cts 0
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Nip\Config\FileParser;
4
5
/**
6
 * Class AbstractFileParser
7
 * @package Nip\Config\FileParser
8
 */
9
abstract class AbstractFileParser implements FileParserInterface
10
{
11
    /**
12
     * Path to the config file
13
     *
14
     * @var string
15
     */
16
    protected $path;
17
18
    /**
19
     * Sets the path to the config file
20
     *
21
     * @param string $path
22
     *
23
     * @codeCoverageIgnore
24
     */
25
    public function __construct($path = null)
26
    {
27
        $this->setPath($path);
28
    }
29
30
    /**
31
     * @return string
32
     */
33 1
    public function getPath()
34
    {
35 1
        return $this->path;
36
    }
37
38
    /**
39
     * @param string $path
40
     * @return $this
41
     */
42 1
    public function setPath($path)
43
    {
44 1
        $this->path = $path;
45
46 1
        return $this;
47
    }
48
}
49