Completed
Push — b0.25.0 ( 08d9c9...6b8d05 )
by Sebastian
04:56
created

NullRoute   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 3
dl 0
loc 20
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A toArray() 0 3 1
1
<?php
2
3
/**
4
 * Linna Framework.
5
 *
6
 * @author Sebastian Rapetti <[email protected]>
7
 * @copyright (c) 2018, Sebastian Rapetti
8
 * @license http://opensource.org/licenses/MIT MIT License
9
 */
10
declare(strict_types=1);
11
12
namespace Linna\Router;
13
14
/**
15
 * Describe null routes.
16
 */
17
class NullRoute implements RouteInterface
18
{
19
    /**
20
     * Constructor.
21
     *
22
     * @param array $route
23
     */
24 4
    public function __construct(array $route = [])
25
    {
26 4
        unset($route);
27 4
    }
28
29
    /**
30
     * Return route array.
31
     *
32
     * @return array
33
     */
34 1
    public function toArray(): array
35
    {
36 1
        return [];
37
    }
38
}
39