Test Failed
Branch develop (ab83c3)
by Bohuslav
02:47
created

Base   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A build() 0 4 1
1
<?php
2
namespace Kambo\Router\Route\Builder;
3
4
use Kambo\Router\Route\Builder;
5
use Kambo\Router\Route\Route\Base as BaseRoute;
6
7
/**
8
 * Build instance of the base route
9
 *
10
 * @package Kambo\Router\Route
11
 * @author  Bohuslav Simek <[email protected]>
12
 * @license MIT
13
 */
14
class Base implements Builder
15
{
16
    /**
17
     * Build instance of the route
18
     *
19
     * @param mixed $method  Route method - GET, POST, etc...
20
     * @param mixed $url     route definition
21
     * @param mixed $handler handler which will be executed if the url match
22
     *                       the route
23
     *
24
     * @return \Kambo\Router\Route\Route\Base Base route
25
     */
26
    public function build($method, $url, $handler)
27
    {
28
        return new BaseRoute($method, $url, $handler);
29
    }
30
}
31