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.

AdminController::redirect()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Afrittella\BackProject\Http\Controllers;
4
5
use Afrittella\BackProject\Exceptions\NotSavedException;
6
7
class AdminController extends Controller
8
{
9
    protected $data = []; // the information we send to the view
10
11
    /**
12
     * Create a new controller instance.
13
     */
14
    public function __construct()
15
    {
16
        $this->middleware('admin');
17
    }
18
19
    /**
20
     * Show the admin dashboard.
21
     *
22
     * @return \Illuminate\Http\Response
23
     */
24
    public function dashboard()
25
    {
26
        $this->data['title'] = trans('back-project::base.dashboard'); // set the page title
27
28
        return view('back-project::dashboard', $this->data);
29
    }
30
31
    /**
32
     * Redirect to the dashboard.
33
     *
34
     * @return \Illuminate\Routing\Redirector|\Illuminate\Http\RedirectResponse
35
     */
36
    public function redirect()
37
    {
38
        // The '/admin' route is not to be used as a page, because it breaks the menu's active state.
39
        return redirect(config('back-project.route_prefix').'/dashboard');
40
    }
41
}
42