Options   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 106
Duplicated Lines 0 %

Test Coverage

Coverage 33.33%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 16
c 1
b 0
f 0
dl 0
loc 106
ccs 8
cts 24
cp 0.3333
rs 10
wmc 10

10 Methods

Rating   Name   Duplication   Size   Complexity  
A setNamespace() 0 3 1
A setFormatOutput() 0 3 1
A getCharset() 0 3 1
A isFormatOutput() 0 3 1
A setCharset() 0 3 1
A setRootName() 0 3 1
A setVersion() 0 3 1
A getNamespace() 0 3 1
A getRootName() 0 3 1
A getVersion() 0 3 1
1
<?php
2
3
namespace Bavix\XMLReader;
4
5
class Options
6
{
7
8
    /**
9
     * @var string
10
     */
11
    protected $version = '1.0';
12
13
    /**
14
     * @var string
15
     */
16
    protected $charset = 'utf-8';
17
18
    /**
19
     * @var string
20
     */
21
    protected $rootName = 'bavix';
22
23
    /**
24
     * @var bool
25
     */
26
    protected $formatOutput = true;
27
28
    /**
29
     * @var string
30
     */
31
    protected $namespace = 'xmlns';
32
33
    /**
34
     * @return string
35
     */
36 1
    public function getVersion(): string
37
    {
38 1
        return $this->version;
39
    }
40
41
    /**
42
     * @param string $version
43
     */
44
    public function setVersion(string $version): void
45
    {
46
        $this->version = $version;
47
    }
48
49
    /**
50
     * @return string
51
     */
52 1
    public function getCharset(): string
53
    {
54 1
        return $this->charset;
55
    }
56
57
    /**
58
     * @param string $charset
59
     */
60
    public function setCharset(string $charset): void
61
    {
62
        $this->charset = $charset;
63
    }
64
65
    /**
66
     * @return string
67
     */
68 1
    public function getRootName(): string
69
    {
70 1
        return $this->rootName;
71
    }
72
73
    /**
74
     * @param string $rootName
75
     */
76
    public function setRootName(string $rootName): void
77
    {
78
        $this->rootName = $rootName;
79
    }
80
81
    /**
82
     * @return bool
83
     */
84 1
    public function isFormatOutput(): bool
85
    {
86 1
        return $this->formatOutput;
87
    }
88
89
    /**
90
     * @param bool $formatOutput
91
     */
92
    public function setFormatOutput(bool $formatOutput): void
93
    {
94
        $this->formatOutput = $formatOutput;
95
    }
96
97
    /**
98
     * @return string
99
     */
100
    public function getNamespace(): string
101
    {
102
        return $this->namespace;
103
    }
104
105
    /**
106
     * @param string $namespace
107
     */
108
    public function setNamespace(string $namespace): void
109
    {
110
        $this->namespace = $namespace;
111
    }
112
113
}
114