Completed
Push — master ( 672d95...766bd1 )
by Korotkov
01:54
created

Route   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 19
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 8 2
1
<?php
2
3
/**
4
 * Date: 15.07.16
5
 * Time: 17:40
6
 *
7
 * @author    : Korotkov Danila <[email protected]>
8
 * @copyright Copyright (c) 2016, Korotkov Danila
9
 * @license   http://www.gnu.org/licenses/gpl.html GNU GPLv3.0
10
 */
11
12
namespace App;
13
14
use Rudra\Router;
15
use Rudra\RouterException;
16
17
class Route
18
{
19
20
    /**
21
     * Устанавливаем приоритет маршрутов
22
     *
23
     * @param \Rudra\Router $router
24
     *
25
     * @throws \Rudra\RouterException
26
     */
27
    public function run(Router $router)
28
    {
29
        $router->annotation('MainController', 'actionIndex');              // mainpage
30
31
        if (!$router->isToken()) {
32
            throw new RouterException('404');
33
        }
34
    }
35
}