Configuration   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 37
ccs 0
cts 16
cp 0
rs 10
wmc 7
lcom 1
cbo 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getPath() 0 4 2
A getTable() 0 4 2
A getConnection() 0 4 2
1
<?php
2
namespace Wandu\Migrator;
3
4
class Configuration
5
{
6
    /** @var array */
7
    protected $config;
8
    
9
    /**
10
     * @param array $config
11
     */
12
    public function __construct(array $config = [])
13
    {
14
        $this->config = $config;
15
    }
16
17
    /**
18
     * @return string
19
     */
20
    public function getPath()
21
    {
22
        return isset($this->config['path']) ? $this->config['path'] : null;
23
    }
24
25
    /**
26
     * @return string
27
     */
28
    public function getTable()
29
    {
30
        return isset($this->config['table']) ? $this->config['table'] : null;
31
    }
32
33
    /**
34
     * @return string
35
     */
36
    public function getConnection()
37
    {
38
        return isset($this->config['connection']) ? $this->config['connection'] : null;
39
    }
40
}
41