ConfigProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 62
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
B __invoke() 0 59 1
1
<?php
2
3
namespace Web;
4
5
class ConfigProvider
6
{
7
    public function __invoke()
8
    {
9
        return [
10
            'templates' => [
11
                'map'   => [
12
                    'layout/web'         => 'templates/layout/web.phtml',
13
                    'article/pagination' => 'templates/partial/pagination.phtml',
14
                ],
15
                'paths' => [
16
                    'templates' => ['templates'],
17
                    'web'       => ['templates/web'],
18
                ],
19
            ],
20
21
            'dependencies' => [
22
                'factories' => [
23
                    Action\HomeAction::class   => Factory\Action\HomeActionFactory::class,
24
                    Action\PageAction::class   => Factory\Action\PageActionFactory::class,
25
                    Action\PostsAction::class  => Factory\Action\PostsActionFactory::class,
26
                    Action\PostAction::class   => Factory\Action\PostActionFactory::class,
27
                    Action\VideosAction::class => Factory\Action\VideosActionFactory::class,
28
                    Action\VideoAction::class  => Factory\Action\VideoActionFactory::class,
29
                    Action\EventsAction::class => Factory\Action\EventsActionFactory::class,
30
                    Action\EventAction::class  => Factory\Action\EventActionFactory::class,
31
                ],
32
            ],
33
34
            'routes' => [
35
                [
36
                    'name'       => 'home',
37
                    'path'       => '/',
38
                    'middleware' => Action\HomeAction::class,
39
                ],
40
                [
41
                    'name'       => 'page',
42
                    'path'       => '/{url_slug}',
43
                    'middleware' => Action\PageAction::class,
44
                ],
45
                [
46
                    'name'       => 'category',
47
                    'path'       => '/{category}/',
48
                    'middleware' => [
49
                        Action\PostsAction::class,
50
                        Action\VideosAction::class,
51
                        Action\EventsAction::class,
52
                    ],
53
                ],
54
                [
55
                    'name'       => 'post',
56
                    'path'       => '/{segment_1}/{segment_2}',
57
                    'middleware' => [
58
                        Action\PostAction::class,
59
                        Action\VideoAction::class,
60
                        Action\EventAction::class,
61
                    ],
62
                ],
63
            ],
64
        ];
65
    }
66
}
67