Completed
Push — master ( c458f8...eeebc2 )
by Matze
06:56
created

Config   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 26
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\Annotations\Annotations\Inject;
6
use BrainExe\Core\Annotations\Controller as ControllerAnnotation;
7
use BrainExe\Core\Annotations\Guest;
8
use BrainExe\Core\Annotations\Route;
9
use Symfony\Component\HttpFoundation\Response;
10
11
/**
12
 * @ControllerAnnotation("Core.Index.Config")
13
 */
14
class Config
15
{
16
    /**
17
     * @var array
18
     */
19
    private $config = [];
20
21
    /**
22
     * @Inject({"%config.public%"})
23
     * @param array $config
24
     */
25
    public function __construct(array $config)
26
    {
27
        $this->config = $config;
28
    }
29
30
    /**
31
     * @return mixed[]
32
     * @Route("/config/", name="config")
33
     * @Guest
34
     */
35
    public function config() : array
36
    {
37
        return $this->config;
38
    }
39
}
40