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.

UserController   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 26
rs 10
c 0
b 0
f 0
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A index() 0 9 2
1
<?php
2
3
namespace App\Http\Controllers;
4
5
use Auth;
6
7
class UserController extends Controller
8
{
9
    /**
10
     * Create a new controller instance.
11
     *
12
     * @return void
13
     */
14
    public function __construct()
15
    {
16
        $this->middleware('auth');
17
    }
18
19
    /**
20
     * Show the application dashboard.
21
     *
22
     * @return \Illuminate\Http\Response
23
     */
24
    public function index()
25
    {
26
        $user = Auth::user();
27
28
        if ($user->isAdmin()) {
0 ignored issues
show
Bug introduced by
The method isAdmin() does not exist on Illuminate\Contracts\Auth\Authenticatable. It seems like you code against a sub-type of Illuminate\Contracts\Auth\Authenticatable such as Illuminate\Foundation\Auth\User. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

28
        if ($user->/** @scrutinizer ignore-call */ isAdmin()) {
Loading history...
29
            return view('pages.admin.home');
0 ignored issues
show
Bug Best Practice introduced by
The expression return view('pages.admin.home') returns the type Illuminate\View\View which is incompatible with the documented return type Illuminate\Http\Response.
Loading history...
30
        }
31
32
        return view('pages.user.home');
0 ignored issues
show
Bug Best Practice introduced by
The expression return view('pages.user.home') returns the type Illuminate\View\View which is incompatible with the documented return type Illuminate\Http\Response.
Loading history...
33
    }
34
}
35