Completed
Push — develop-3.0 ( 4fe777...24fc5d )
by Mohamed
09:15
created

AdminAccess   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 9
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A before() 0 6 3
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\Extensions\Policies;
13
14
use Tinyissue\Contracts\Model\UserInterface;
15
16
trait AdminAccess
17
{
18
    public function before($user)
19
    {
20
        if ($user instanceof UserInterface && $user->isAdmin()) {
21
            return true;
22
        }
23
    }
24
}
25