UserController   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 3
dl 0
loc 24
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A showProfile() 0 5 1
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
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
13
     */
14
    public function __construct()
15
    {
16
        $this->middleware('auth');
17
    }
18
19
    public function showProfile()
20
    {
21
        $controller = new AdminController();
22
        return $controller->editUser(Auth::user()->id);
23
    }
24
25
    public function logout()
26
    {
27
        Auth::logout();
28
        return redirect()->intended('login');
29
    }
30
}
31