ConfigProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 43 1
1
<?php
2
3
namespace Category;
4
5
class ConfigProvider
6
{
7
    public function __invoke()
8
    {
9
        return [
10
            'templates' => [
11
                'paths' => [
12
                    'category' => [__DIR__.'/../templates/category'],
13
                ],
14
            ],
15
16
            'dependencies' => [
17
                'factories' => [
18
                    // Service
19
                    Service\CategoryService::class    => Factory\Service\CategoryServiceFactory::class,
20
                    Mapper\CategoryMapper::class      => \Std\MapperFactory::class,
21
                    Filter\CategoryFilter::class      => \Zend\ServiceManager\Factory\InvokableFactory::class,
22
23
                    // Controller
24
                    Controller\IndexController::class => Factory\Controller\IndexFactory::class,
25
                ],
26
            ],
27
28
            'routes' => [
29
                [
30
                    'name'            => 'admin.categories',
31
                    'path'            => '/admin/categories',
32
                    'middleware'      => Controller\IndexController::class,
33
                    'allowed_methods' => ['GET'],
34
                ],
35
                [
36
                    'name'            => 'admin.categories.action',
37
                    'path'            => '/admin/categories/{action}/{id}',
38
                    'middleware'      => Controller\IndexController::class,
39
                    'allowed_methods' => ['GET', 'POST'],
40
                ],
41
            ],
42
43
            'view_helpers' => [
44
                'factories' => [
45
                    'category' => View\Helper\CategoryHelperFactory::class,
46
                ],
47
            ],
48
        ];
49
    }
50
}
51