GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( f70a3e...865955 )
by Piyapan
03:14
created

menuIsRoute()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 3
dl 0
loc 4
rs 10
c 1
b 0
f 1
cc 2
nc 2
nop 2
1
<?php
2
3
if (!function_exists('menuIsRoute')) {
4
  function menuIsRoute($route, $active_class = 'active') {
5
    $curr_route = Route::currentRouteName();
6
    if($route == $curr_route) {
7
      return $active_class;
8
    }
9
  }
10
}
11
12
if (!function_exists('urlDoesContainParam')) {
13
  function urlDoesContainParam($param_name, $param_value = true, $active_class = 'active') {
14
    if(request()->get($param_name) == $param_value) {
15
      return $active_class;
16
    }
17
  }
18
}
19
20
/**
21
 * prints array in readable format
22
 *
23
 * @param $data
24
 * @param bool $exit
25
 */
26
function prettyPrint($data, $exit = true)
27
{
28
    echo '<pre>';
29
    print_r($data);
30
    echo '</pre>';
31
32
    if ($exit) {
33
        exit;
0 ignored issues
show
Best Practice introduced by
Using exit here is not recommended.

In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.

Loading history...
34
    }
35
}
36
37