DatabaseConfig   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 8
lcom 1
cbo 0
dl 0
loc 45
rs 10
c 0
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getSource() 0 4 1
A getSourceBasename() 0 4 1
A getDestination() 0 4 1
A getFilename() 0 4 1
A getFlag() 0 4 1
A getRegionVarsPath() 0 4 1
A getDatabasePath() 0 4 1
1
<?php
2
3
namespace ZfSnapGeoip;
4
5
/**
6
 * Config
7
 *
8
 * @author Witold Wasiczko <[email protected]>
9
 */
10
class DatabaseConfig
11
{
12
    protected $data;
13
14
    public function __construct(array $data)
15
    {
16
        $this->data = $data;
17
    }
18
19
    public function getSource()
20
    {
21
        return $this->data['source'];
22
    }
23
24
    public function getSourceBasename()
25
    {
26
        return basename($this->getSource());
27
    }
28
29
    public function getDestination()
30
    {
31
        return $this->data['destination'];
32
    }
33
34
    public function getFilename()
35
    {
36
        return $this->data['filename'];
37
    }
38
39
    public function getFlag()
40
    {
41
        return $this->data['flag'];
42
    }
43
44
    public function getRegionVarsPath()
45
    {
46
        return $this->data['regionvars'];
47
    }
48
49
    public function getDatabasePath()
50
    {
51
        return $this->getDestination() . $this->getFilename();
52
    }
53
54
}
55