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

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

3 Methods

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