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.

flashtoast()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 2
1
<?php
2
3
4
if (! function_exists('flashtoast')) {
5
    /**
6
     * Arrange for a flash message.
7
     *
8
     * @param  string|null $message
9
     * @param  string      $level
10
     * @return \Laracasts\Flash\FlashNotifier
0 ignored issues
show
Bug introduced by
The type Laracasts\Flash\FlashNotifier was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
11
     */
12
    function flashtoast($message = null, $level = 'info')
13
    {
14
        $notifier = app('flashtoast');
15
        if (! is_null($message)) {
16
            return $notifier->message($message, $level);
0 ignored issues
show
Bug Best Practice introduced by
The expression return $notifier->message($message, $level) returns the type RaysTech\StarterKit\Supports\FlashToast which is incompatible with the documented return type Laracasts\Flash\FlashNotifier.
Loading history...
17
        }
18
        return $notifier;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $notifier returns the type RaysTech\StarterKit\Supports\FlashToast which is incompatible with the documented return type Laracasts\Flash\FlashNotifier.
Loading history...
19
    }
20
  }
21
22
if (!function_exists('menuIsRoute')) {
23
  function menuIsRoute($route, $active_class = 'active') {
24
    $curr_route = Route::currentRouteName();
25
    if($route == $curr_route) {
26
      return $active_class;
27
    }
28
  }
29
}
30
31
if (!function_exists('urlDoesContainParam')) {
32
  function urlDoesContainParam($param_name, $param_value = true, $active_class = 'active') {
33
    if(request()->get($param_name) == $param_value) {
34
      return $active_class;
35
    }
36
  }
37
}
38
39
/**
40
 * prints array in readable format
41
 *
42
 * @param $data
43
 * @param bool $exit
44
 */
45
function prettyPrint($data, $exit = true)
46
{
47
    echo '<pre>';
48
    print_r($data);
49
    echo '</pre>';
50
51
    if ($exit) {
52
        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...
53
    }
54
}
55
56