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.
Passed
Push — master ( 622662...e0f88c )
by Toby
14:55
created

Response::user()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
namespace BristolSU\Module\Typeform\Models;
4
5
use BristolSU\Support\ActivityInstance\Contracts\ActivityInstanceRepository;
6
use BristolSU\Support\Authentication\HasResource;
7
use Illuminate\Database\Eloquent\Model;
8
9
class Response extends Model
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class Response
Loading history...
10
{
11
    use HasResource;
12
    
13
    protected $table = 'typeform_responses';
14
    
15
    protected $keyType = 'string';
16
    
17
    public $incrementing = false;
18
    
19
    protected $fillable = [
20
        'id',
21
        'form_id',
22
        'submitted_by',
23
        'submitted_at',
24
        'module_instance_id',
25
        'activity_instance_id',
26
        'approved'
27
    ];
28
    
29
    protected $casts = [
30
        'submitted_at' => 'datetime',
31
        'approved' => 'boolean'
32
    ];
33
    
34
    protected $appends = [
35
        'activity_instance', 'submitted_by_user'
36
    ];
37
38 4
    public function answers()
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function answers()
Loading history...
39
    {
40 4
        return $this->hasMany(Answer::class);
41
    }
42
43 1
    public function user()
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function user()
Loading history...
44
    {
45 1
        return app(\BristolSU\ControlDB\Contracts\Repositories\User::class)->getById($this->submitted_by);
46
    }
47
48 1
    public function getSubmittedByUserAttribute()
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function getSubmittedByUserAttribute()
Loading history...
49
    {
50 1
        return $this->user();
51
    }
52
53 1
    public function activityInstance()
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function activityInstance()
Loading history...
54
    {
55 1
        return app(ActivityInstanceRepository::class)->getById($this->activity_instance_id);
56
    }
57
58 1
    public function getActivityInstanceAttribute()
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function getActivityInstanceAttribute()
Loading history...
59
    {
60 1
        return $this->activityInstance();
61
    }
62
    
63
}