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

AdminPolicy::manage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 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 Tinyissue\Model\User;
15
use Illuminate\Auth\Access\HandlesAuthorization;
16
17
/**
18
 * Class AdminPolicy.
19
 * Manage: admin role.
20
 *
21
 * @author Mohamed Alsharaf <[email protected]>
22
 */
23
class AdminPolicy
24
{
25
    use HandlesAuthorization;
26
27
    /**
28
     * Determine if the given user can manages administrator area.
29
     *
30
     * @param  User $user
31
     *
32
     * @return bool
33
     */
34
    public function manage(User $user)
35
    {
36
        $this->dd(__METHOD__);
0 ignored issues
show
Bug introduced by
The method dd() does not seem to exist on object<Tinyissue\Policies\AdminPolicy>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
37
        return $user->isAdmin();
38
    }
39
}
40