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.
Completed
Push — master ( d32316...bc6278 )
by Haven
02:32
created

User::getEmailVariables()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
crap 1
1
<?php
2
3
namespace App\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
/**
8
*
9
*/
10
class User extends Model
11
{
12
13
	protected $table = 'users';
14
15
	public $first_name;
16
17
	public $last_name;
18
19
	public $email;
20
21
	protected $fillable = [
22
		'email',
23
		'name',
24
		'password',
25
	];
26
27
	public function setPassword($password)
28
	{
29
		$this->update([
30
			'password' => password_hash($password,PASSWORD_DEFAULT)
31
		]);
32
	}
33
34 1
	public function setFirstName($firstName)
35
	{
36 1
		$this->first_name = trim($firstName);
37 1
	}
38
39
	public function getFirstName()
40
	{
41
		return $this->first_name;
42
	}
43
44 1
	public function setLastName($lastName)
45
	{
46 1
		$this->last_name = trim($lastName);
47 1
	}
48
49
	public function getLastName()
50
	{
51
		return $this->last_name;
52
	}
53
54 1
	public function setEmail($email)
55
	{
56 1
		$this->email = $email;
57 1
	}
58
59 1
	public function getEmail()
60
	{
61 1
	    return $this->email;
62
	}
63
64 1
	public function getFullName()
65
	{
66 1
		return "$this->first_name $this->last_name";
67
	}
68
69 1
	public function getEmailVariables()
70
	{
71
	return [
72 1
		'full_name' => $this->getFullName(),
73 1
		'email' => $this->getEmail(),
74
	];
75
	}
76
}