Completed
Push — master ( eb4b77...31dfb2 )
by Jeroen
02:30
created

helpers.php ➔ isActive()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 2
nc 2
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
if(! function_exists('isRoute')) {
3
4
    /**
5
     * Determine if the given route is the current one.
6
     * 
7
     * @param  string  $route
8
     * @param  string  $output
9
     * @return boolean
0 ignored issues
show
Documentation introduced by
Should the return type not be string|null?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
10
     */
11
    function isActive($route, $output = "active")
12
    {
13
        if (Route::currentRouteName() == $route) return $output;
14
    }
15
}