Test Failed
Pull Request — master (#11)
by Witold
03:24
created

ConfigProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 23
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __invoke() 0 8 1
A getDependencies() 0 4 1
1
<?php
2
namespace TacticianModule;
3
4
class ConfigProvider
5
{
6
    private $config;
7
8
    public function __construct()
9
    {
10
        $this->config = (new Module())->getConfig();
11
    }
12
13
    public function __invoke()
14
    {
15
        $config = $this->config;
16
17
        $config['dependencies'] = $config['service_manager'];
18
19
        return $config;
20
    }
21
22
    public function getDependencies()
23
    {
24
        return $this->config['service_manager'];
25
    }
26
}
27