Completed
Push — develop-3.0 ( 5ab583...f20237 )
by Mohamed
06:33
created

AdminPolicy   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A manage() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the Tinyissue package.
5
 *
6
 * (c) Mohamed Alsharaf <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Tinyissue\Policies;
13
14
use Illuminate\Auth\Access\HandlesAuthorization;
15
use Tinyissue\Model\User;
16
17
class AdminPolicy
18
{
19
    use HandlesAuthorization;
20
21
    /**
22
     * Determine if the given user can manages administrator area.
23
     *
24
     * @param User $user
25
     *
26
     * @return bool
27
     */
28
    public function manage(User $user)
29
    {
30
        return $user->isAdmin();
31
    }
32
}
33