AbstractFileParser   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

3 Methods

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