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.

User   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 63
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 4
eloc 12
c 3
b 0
f 0
dl 0
loc 63
ccs 9
cts 9
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getDataAttribute() 0 3 1
A dataProviderId() 0 3 1
A id() 0 3 1
A setDataProviderId() 0 4 1
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
4
namespace BristolSU\ControlDB\Models;
5
6
7
use BristolSU\ControlDB\Contracts\Models\User as UserContract;
8
use BristolSU\ControlDB\Traits\UserTrait;
9
use Illuminate\Database\Eloquent\Model;
10
use Illuminate\Database\Eloquent\SoftDeletes;
11
12
/**
13
 * Represents a user
14
 */
0 ignored issues
show
Coding Style introduced by
Missing @category tag in class comment
Loading history...
Coding Style introduced by
Missing @package tag in class comment
Loading history...
Coding Style introduced by
Missing @author tag in class comment
Loading history...
Coding Style introduced by
Missing @license tag in class comment
Loading history...
Coding Style introduced by
Missing @link tag in class comment
Loading history...
15
class User extends Model implements UserContract
16
{
17
    use SoftDeletes, UserTrait {
18
        setDataProviderId as baseSetDataProviderId;
19
    }
20
    
21
    /**
22
     * Table to use
23
     *
24
     * @var string
25
     */
26
    protected $table = 'control_users';
27
28
    /**
29
     * Fillable attributes
30
     *
31
     * @var array
32
     */
33
    protected $fillable = ['data_provider_id'];
34
35
    /**
36
     * Attributes to append when casting to an array
37
     *
38
     * @var array
39
     */
40
    protected $appends = [
41
        'data'
42
    ];
43
44
    /**
45
     * ID of the user
46
     *
47
     * @return int
48
     */
49 73
    public function id(): int
50
    {
51 73
        return $this->id;
52
    }
53
54
    /**
55
     * ID of the data provider for the user
56
     *
57
     * @return int
58
     */
59 21
    public function dataProviderId(): int
60
    {
61 21
        return $this->data_provider_id;
62
    }
63
64
    /**
65
     * Laravel integration for a data property
66
     *
67
     * @return \BristolSU\ControlDB\Contracts\Models\DataUser
68
     */
69 12
    public function getDataAttribute(): \BristolSU\ControlDB\Contracts\Models\DataUser
70
    {
71 12
        return $this->data();
72
    }
73
    
74 2
    public function setDataProviderId(int $dataProviderId): void
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function setDataProviderId()
Loading history...
75
    {
76 2
        $this->baseSetDataProviderId($dataProviderId);
77 2
        $this->refresh();
78 2
    }
79
}
80