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.

PageView::getModuleInstanceAttribute()   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 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\StaticPage\Models;
4
5
use BristolSU\ControlDB\Contracts\Repositories\User;
6
use BristolSU\Support\ActivityInstance\Contracts\ActivityInstanceRepository;
7
use BristolSU\Support\Authentication\HasResource;
8
use BristolSU\Support\ModuleInstance\Contracts\ModuleInstanceRepository;
9
use Illuminate\Database\Eloquent\Model;
10
11
class PageView extends Model
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class PageView
Loading history...
12
{
13
    use HasResource;
14
    
15
    protected $table = 'static_page_page_views';
16
    
17
    protected $appends = [
18
        'user', 'activity_instance', 'module_instance'
19
    ];
20
    
21
    protected $fillable = [
22
        'viewed_by'
23
    ];
24
25 5
    public function getUserAttribute()
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function getUserAttribute()
Loading history...
26
    {
27 5
        return app(User::class)->getById($this->viewed_by);
28
    }
29
30 3
    public function getActivityInstanceAttribute()
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function getActivityInstanceAttribute()
Loading history...
31
    {
32 3
        return app(ActivityInstanceRepository::class)->getById($this->activity_instance_id);
33
    }
34
35 3
    public function getModuleInstanceAttribute()
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function getModuleInstanceAttribute()
Loading history...
36
    {
37 3
        return app(ModuleInstanceRepository::class)->getById($this->module_instance_id);
38
    }
39
    
40
}