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.

DataGroup::setEmail()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

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