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.

DataRole::roleName()   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
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 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\AdditionalProperties\HasAdditionalProperties;
8
use BristolSU\ControlDB\Traits\DataRoleTrait;
9
use DateTime;
10
use Illuminate\Database\Eloquent\Model;
11
use Illuminate\Database\Eloquent\SoftDeletes;
12
13
/**
14
 * Handles attributes belonging to a role
15
 */
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...
16
class DataRole extends Model implements \BristolSU\ControlDB\Contracts\Models\DataRole
17
{
18
    use SoftDeletes, HasAdditionalProperties, DataRoleTrait {
19
        setRoleName as baseSetRoleName;
20
        setEmail as baseSetEmail;
21
    }
22
23
    /**
24
     * The table to use
25
     * 
26
     * @var string 
27
     */
28
    protected $table = 'control_data_role';
29
30
    /**
31
     * Fillable attributes
32
     * 
33
     * @var array 
34
     */
35
    protected $fillable = [
36
        'role_name', 'email'
37
    ];
38
39
    /**
40
     * Get the ID of the role
41
     *
42
     * @return int
43
     */
44 25
    public function id(): int
45
    {
46 25
        return $this->id;
47
    }
48
49
50
51
    /**
52
     * Get the email of the role
53
     *
54
     * @return string|null
55
     */
56 9
    public function email(): ?string
57
    {
58 9
        return $this->email;
59
    }
60
61
    /**
62
     * Get the name for the role
63
     * 
64
     * @return string|null
65
     */
66 9
    public function roleName(): ?string
67
    {
68 9
        return $this->role_name;
69
    }
70
71
    /**
72
     * Set the email of the role
73
     *
74
     * @param string|null $email
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
75
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
76 2
    public function setEmail(?string $email): void
77
    {
78 2
        $this->baseSetEmail($email);
79 2
        $this->refresh();
80 2
    }
81
82
    /**
83
     * Set a name for the role
84
     *
85
     * @param string|null $roleName
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
86
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
87 2
    public function setRoleName(?string $roleName): void
88
    {
89 2
        $this->baseSetRoleName($roleName);
90 2
        $this->refresh();
91 2
    }
92
93
94
}