Test Setup Failed
Push — master ( fc6567...89d4a6 )
by Gabriel
07:58
created

url-generation.php ➔ route()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 12

Importance

Changes 0
Metric Value
cc 3
nc 3
nop 3
dl 0
loc 10
ccs 0
cts 6
cp 0
crap 12
rs 9.9332
c 0
b 0
f 0
1
<?php
2
3
namespace Nip\Router;
4
5
/**
6
 * @param $name
7
 * @param array $parameters
8
 * @param bool $absolute
9
 */
10
function route($name, $parameters = [], $absolute = true)
0 ignored issues
show
Unused Code introduced by
The parameter $parameters is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
11
{
12
    if (!function_exists('app')) {
13
        return null;
14
    }
15
    if ($absolute === true) {
16
        return app('router')->assembleFull($name);
17
    }
18
    return app('router')->assemble($name);
19
}