Loader   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 35
rs 10
wmc 1
lcom 0
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A hp ➔ route() 0 4 1
A init() 0 23 1
1
<?php
2
3
/**
4
 * Luthier loader
5
 *
6
 * @author    Anderson Salas <[email protected]>
7
 * @copyright 2017
8
 * @license   GNU-3.0
9
 *
10
 */
11
12
namespace Luthier\Core;
13
14
class Loader
15
{
16
17
    /**
18
     * Returns the Luthier required hooks
19
     *
20
     * @return array
21
     *
22
     * @access public
23
     * @static
24
     */
25
    public static function init()
26
    {
27
        return [
28
            'pre_system' =>
29
                [
30
                    function()
31
                    {
32
                        function route($name, $args = NULL)
33
                        {
34
                            return Route::getRouteByName($name, $args);
35
                        }
36
                    }
37
                ],
38
            'post_controller_constructor' =>
39
                [
40
                    function()
41
                    {
42
                        Middleware::init();
43
                    }
44
                ],
45
46
        ];
47
    }
48
}