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

ConfigProvider::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 7
rs 9.4285
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