ConfigProvider::getDependencies()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 8
nc 1
nop 0
1
<?php
2
3
namespace Dasao\SentryLogger;
4
5
use Zend\Stratigility\Middleware\ErrorHandler;
6
7
/**
8
 * The configuration provider for the User module
9
 *
10
 * @see https://docs.zendframework.com/zend-component-installer/
11
 */
12
class ConfigProvider
13
{
14
    /**
15
     * Returns the configuration array
16
     *
17
     * To add a bit of a structure, each section is defined in a separate
18
     * method which returns an array with its configuration.
19
     *
20
     * @return array
21
     */
22
    public function __invoke() : array
23
    {
24
        return [
25
            'dependencies' => $this->getDependencies(),
26
        ];
27
    }
28
29
    /**
30
     * Returns the container dependencies
31
     *
32
     * @return array
33
     */
34
    public function getDependencies() : array
35
    {
36
        return [
37
            'invokables' => [],
38
            'factories'  => [
39
                Log\SentryLogger::class       => Log\SentryLoggerFactory::class,
40
                Log\SentryLoggerConfig::class => Log\SentryLoggerConfigFactory::class,
41
            ],
42
            'delegators' => [
43
                ErrorHandler::class => [
44
                    Listener\SentryErrorListenerDelegatorFactory::class,
45
                ],
46
            ],
47
        ];
48
    }
49
}
50