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.

ButtonClick::getActivityInstanceAttribute()   A
last analyzed

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 1
Bugs 0 Features 0
Metric Value
eloc 1
nc 1
nop 0
dl 0
loc 3
c 1
b 0
f 0
cc 1
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
4
namespace BristolSU\Module\StaticPage\Models;
5
6
7
use BristolSU\ControlDB\Contracts\Repositories\User;
8
use BristolSU\Support\ActivityInstance\Contracts\ActivityInstanceRepository;
9
use BristolSU\Support\Authentication\HasResource;
10
use BristolSU\Support\ModuleInstance\Contracts\ModuleInstanceRepository;
11
use Illuminate\Database\Eloquent\Model;
12
use Illuminate\Database\Eloquent\SoftDeletes;
13
14
class ButtonClick extends Model
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class ButtonClick
Loading history...
15
{
16
17
    use HasResource, SoftDeletes;
18
19
    protected $table = 'static_page_button_clicks';
20
21
    protected $appends = [
22
        'user', 'activity_instance', 'module_instance'
23
    ];
24
25
    protected $fillable = [
26
        'clicked_by'
27
    ];
28
29 11
    public function getUserAttribute()
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function getUserAttribute()
Loading history...
30
    {
31 11
        return app(User::class)->getById($this->clicked_by);
32
    }
33
34 7
    public function getActivityInstanceAttribute()
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function getActivityInstanceAttribute()
Loading history...
35
    {
36 7
        return app(ActivityInstanceRepository::class)->getById($this->activity_instance_id);
37
    }
38
39 7
    public function getModuleInstanceAttribute()
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function getModuleInstanceAttribute()
Loading history...
40
    {
41 7
        return app(ModuleInstanceRepository::class)->getById($this->module_instance_id);
42
    }
43
44
45
}
46