Completed
Pull Request — master (#8)
by
unknown
02:25
created

XmlFormat::getVersion()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 0
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Mathielen\ImportEngine\Storage\Format;
4
5
class XmlFormat extends Format
6
{
7
    private $xpath;
8
9
    protected $name = 'XML File';
10
    protected $id = 'xml';
11
12 2
    protected $rowNodeName;
13
    protected $rootNodeName;
14 2
    protected $encoding;
15 2
    protected $version;
16
17 1 View Code Duplication
    public function __construct($xpath = null, $rowNodeName='node', $rootNodeName = 'root', $encoding = null, $version = '1.0')
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
18
    {
19 1
        $this->xpath = $xpath;
20
        $this->rowNodeName = $rowNodeName;
21
        $this->rootNodeName = $rootNodeName;
22
        $this->encoding = $encoding;
23
        $this->version = $version;
24
    }
25
26
    public function getXpath()
27
    {
28
        return $this->xpath;
29
    }
30
31
    /**
32
     * @return string
33
     */
34
    public function getRowNodeName()
35
    {
36
        return $this->rowNodeName;
37
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function getRootNodeName()
43
    {
44
        return $this->rootNodeName;
45
    }
46
47
    /**
48
     * @return null
49
     */
50
    public function getEncoding()
51
    {
52
        return $this->encoding;
53
    }
54
55
    /**
56
     * @return string
57
     */
58
    public function getVersion()
59
    {
60
        return $this->version;
61
    }
62
}
63