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

Base::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 3
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