Completed
Push — master ( 96a0f4...96dd95 )
by ARCANEDEV
03:51
created

LogViewerPolicy   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 27
ccs 0
cts 20
cp 0
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A dashboardPolicy() 0 4 1
A listPolicy() 0 4 1
A showPolicy() 0 4 1
A downloadPolicy() 0 4 1
A deletePolicy() 0 4 1
1
<?php namespace Arcanesoft\Foundation\Policies;
2
3
use Arcanesoft\Contracts\Auth\Models\User;
4
5
/**
6
 * Class     LogViewerPolicy
7
 *
8
 * @package  Arcanesoft\Foundation\Policies
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class LogViewerPolicy
12
{
13
    public function dashboardPolicy(User $user)
14
    {
15
        return $user->may('foundation.logviewer.dashboard');
16
    }
17
18
    public function listPolicy(User $user)
19
    {
20
        return $user->may('foundation.logviewer.list');
21
    }
22
23
    public function showPolicy(User $user)
24
    {
25
        return $user->may('foundation.logviewer.show');
26
    }
27
28
    public function downloadPolicy(User $user)
29
    {
30
        return $user->may('foundation.logviewer.download');
31
    }
32
33
    public function deletePolicy(User $user)
34
    {
35
        return $user->may('foundation.logviewer.delete');
36
    }
37
}
38