Config   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 26
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A config() 0 4 1
1
<?php
2
3
namespace BrainExe\Core\Index;
4
5
use BrainExe\Core\Annotations\Inject;
6
use BrainExe\Core\Annotations\Controller as ControllerAnnotation;
7
use BrainExe\Core\Annotations\Guest;
8
use BrainExe\Core\Annotations\Route;
9
10
/**
11
 * @ControllerAnnotation
12
 */
13
class Config
14
{
15
    /**
16
     * @var array
17
     */
18
    private $config = [];
19
20
    /**
21
     * @Inject({"%config.public%"})
22
     * @param array $config
23
     */
24 1
    public function __construct(array $config)
25
    {
26 1
        $this->config = $config;
27 1
    }
28
29
    /**
30
     * @return mixed[]
31
     * @Route("/config/", name="config")
32
     * @Guest
33
     */
34 1
    public function config() : array
35
    {
36 1
        return $this->config;
37
    }
38
}
39