GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Authorizable::cant()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 1
b 0
f 1
1
<?php
2
3
namespace Milkmeowo\Framework\Base\Traits\Auth;
4
5
use Illuminate\Contracts\Auth\Access\Gate;
6
7
trait Authorizable
8
{
9
    /**
10
     * Determine if the entity has a given ability.
11
     *
12
     * @param  string  $ability
13
     * @param  array|mixed  $arguments
14
     * @return bool
15
     */
16
    public function can($ability, $arguments = [])
17
    {
18
        return app(Gate::class)->forUser($this)->check($ability, $arguments);
19
    }
20
21
    /**
22
     * Determine if the entity does not have a given ability.
23
     *
24
     * @param  string  $ability
25
     * @param  array|mixed  $arguments
26
     * @return bool
27
     */
28
    public function cant($ability, $arguments = [])
29
    {
30
        return ! $this->can($ability, $arguments);
31
    }
32
33
    /**
34
     * Determine if the entity does not have a given ability.
35
     *
36
     * @param  string  $ability
37
     * @param  array|mixed  $arguments
38
     * @return bool
39
     */
40
    public function cannot($ability, $arguments = [])
41
    {
42
        return $this->cant($ability, $arguments);
43
    }
44
}
45