Config::config()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 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