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.
Completed
Push — master ( 752117...c639b4 )
by Victor
01:28 queued 11s
created

Approval::accept()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 0
cts 0
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Victorlap\Approvable;
4
5
use Illuminate\Database\Eloquent\Model as Eloquent;
6
7
/**
8
 * Class Approval
9
 * @package Victorlap\Approvable
10
 */
11
class Approval extends Eloquent
12
{
13
    public $table = 'approvals';
14
15
    public function approvable()
16
    {
17
        return $this->morphTo();
18
    }
19
20
    public function getFieldName()
21
    {
22
        return $this->key;
23
    }
24
25
    public function accept()
26
    {
27
    }
28
29
    public function reject()
30
    {
31
    }
32
33
    public function scopeOpen($query)
34
    {
35
        return $query->where('approved', null);
36
    }
37
38
    public function scopeRejected($query)
39
    {
40
        return $query->where('approved', false);
41
    }
42
43
    public function scopeAccepted($query)
44
    {
45
        return $query->where('approved', true);
46
    }
47
48
    public function scopeOfClass($query, $class)
49
    {
50
        return $query->where('approvable_type', $class);
51
    }
52
}
53