Passed
Push — master ( e91f52...9735a0 )
by Ma
09:13
created

ConfigProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 32
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 7 1
A getDependencies() 0 6 1
1
<?php
2
3
/**
4
 * Aist Console (http://mateuszsitek.com/projects/console)
5
 *
6
 * @copyright Copyright (c) 2017 DIGITAL WOLVES LTD (http://digitalwolves.ltd) All rights reserved.
7
 * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
8
 */
9
10
namespace Aist\Console;
11
12
use Aist\Console\Helper\HelperSetFactory;
13
use Aist\Console\Helper\Logger\LoggerHelper;
14
use Aist\Console\Helper\Logger\LoggerHelperFactory;
15
use Symfony\Component\Console\Helper\HelperSet;
16
17
class ConfigProvider
18
{
19
    /**
20
     * Returns the configuration array
21
     *
22
     * To add a bit of a structure, each section is defined in a separate
23
     * method which returns an array with its configuration.
24
     *
25
     * @return array
26
     */
27
    public function __invoke()
28
    {
29
        return [
30
            'dependencies' => $this->getDependencies(),
31
            'console' => [
32
                'commands' => [],
33
                'helpers' => [],
34
            ],
35
        ];
36
    }
37
38
    /**
39
     * Returns the container dependencies
40
     *
41
     * @return array
42
     */
43
    public function getDependencies()
44
    {
45
        return [
46
            'factories'  => [
47
                HelperSet::class => HelperSetFactory::class,
48
                LoggerHelper::class => LoggerHelperFactory::class,
49
            ],
50
        ];
51
    }
52
}
53