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   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 10
dl 0
loc 28
c 2
b 0
f 0
rs 10
ccs 6
cts 6
cp 1
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getActivityInstanceAttribute() 0 3 1
A getUserAttribute() 0 3 1
A getModuleInstanceAttribute() 0 3 1
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