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

ConfigProvider::__invoke()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 33
Code Lines 20

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 33
rs 8.8571
c 0
b 0
f 0
cc 1
eloc 20
nc 1
nop 0
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