Completed
Push — master ( 962ab4...d2e7c2 )
by Aleksandar
18s
created

ConfigProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 36
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B __invoke() 0 33 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Register;
6
7
use Zend\ServiceManager\Factory\InvokableFactory;
8
9
class ConfigProvider
10
{
11
    public function __invoke()
12
    {
13
        return [
14
            'templates'    => [
15
                'paths' => [
16
                    'register' => [__DIR__ . '/../templates/register'],
17
                ],
18
            ],
19
            'dependencies' => [
20
                'factories' => [
21
                    Action\RegisterAction::class       => Action\RegisterActionFactory::class,
22
                    Action\HandleRegisterAction::class => Action\HandleRegisterActionFactory::class,
23
                    Service\RegisterService::class     => Service\RegisterServiceFactory::class,
24
                    Filter\RegisterFilter::class       => InvokableFactory::class,
25
                ],
26
            ],
27
28
            'routes' => [
29
                [
30
                    'name'            => 'register',
31
                    'path'            => '/register',
32
                    'middleware'      => Action\RegisterAction::class,
33
                    'allowed_methods' => ['GET'],
34
                ],
35
                [
36
                    'name'            => 'register-handle',
37
                    'path'            => '/register-handle',
38
                    'middleware'      => Action\HandleRegisterAction::class,
39
                    'allowed_methods' => ['POST'],
40
                ]
41
            ],
42
        ];
43
    }
44
}
45