Completed
Push — master ( 0ff3c4...776fbc )
by ARCANEDEV
07:28
created

Policy::before()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 2
c 1
b 0
f 0
nc 2
nop 2
dl 0
loc 4
ccs 0
cts 3
cp 0
crap 6
rs 10
1
<?php namespace Arcanesoft\Foundation\Policies;
2
3
use Arcanesoft\Contracts\Auth\Models\User;
4
5
/**
6
 * Class     Policy
7
 *
8
 * @package  Arcanesoft\Foundation\Policies
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
abstract class Policy
12
{
13
    /* ------------------------------------------------------------------------------------------------
14
     |  Main Functions
15
     | ------------------------------------------------------------------------------------------------
16
     */
17
    /**
18
     * @param  \Arcanesoft\Contracts\Auth\Models\User  $user
19
     * @param  mixed                                   $ability
20
     *
21
     * @return bool
22
     */
23
    public function before(User $user, $ability)
0 ignored issues
show
Unused Code introduced by
The parameter $ability is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
24
    {
25
        if ($user->isAdmin()) return true;
26
    }
27
}
28