Completed
Push — master ( c18c1e...ad6735 )
by ARCANEDEV
12s
created

Policy::before()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 2
eloc 2
nc 2
nop 2
1
<?php namespace Arcanesoft\Auth\Policies;
2
3
use Arcanesoft\Contracts\Auth\Models\User;
4
5
/**
6
 * Class     Policy
7
 *
8
 * @package  Arcanesoft\Auth\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