UsersDashboardController   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 37
rs 10
c 1
b 0
f 0
wmc 5
lcom 0
cbo 1

5 Methods

Rating   Name   Duplication   Size   Complexity  
A index() 0 7 1
A totalUsers() 0 5 1
A totalUserInvitations() 0 4 1
A pendingUserInvitations() 0 4 1
A acceptedUserInvitations() 0 4 1
1
<?php
2
3
namespace Acacha\Users\Http\Controllers;
4
use App\User;
5
6
/**
7
 * Class UsersDashboardController.
8
 *
9
 * @package Acacha\Users\Http\Controllers
10
 */
11
class UsersDashboardController extends Controller
12
{
13
    /**
14
     * Show users dashboard
15
     */
16
    public function index()
17
    {
18
        $this->authorize('see-users-dashboard');
19
        $data = [];
20
21
        return view('acacha_users::dashboard', $data);
22
    }
23
24
    /**
25
     * @return int
26
     */
27
    public function totalUsers()
28
    {
29
//        $this->authorize('obtain-users-dashboard-info');
0 ignored issues
show
Unused Code Comprehensibility introduced by
75% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
30
        return User::all()->count();
31
    }
32
33
    public function totalUserInvitations()
34
    {
35
36
    }
37
38
    public function pendingUserInvitations()
39
    {
40
41
    }
42
43
    public function acceptedUserInvitations()
44
    {
45
46
    }
47
}
48