Passed
Push — master ( de3595...5928a0 )
by dima
05:09
created

User   A

Complexity

Total Complexity 11

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 11
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 56
rs 10

11 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getAddress() 0 3 1
A setAddress() 0 3 1
A getEmail() 0 3 1
A getName() 0 3 1
A getPassword() 0 3 1
A getGroup() 0 3 1
A setEmail() 0 3 1
A setName() 0 3 1
A setPassword() 0 3 1
A setGroup() 0 3 1
1
<?php
2
/*
3
 * To change this license header, choose License Headers in Project Properties.
4
 * To change this template file, choose Tools | Templates
5
 * and open the template in the editor.
6
 */
7
8
namespace Test\Domain\User;
9
10
use Test\Domain\UserGroup\UserGroup;
11
12
/**
13
 * Description of Producer
14
 *
15
 * @author d.lanec
16
 */
17
class User extends \SimpleORM\AbstractEntity {
18
19
	protected $email;
20
	protected $name;
21
	protected $password;
22
	protected $group;
23
	protected $address;
24
			
25
	function __construct($name, $email, $password, UserGroup $Group) {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
26
		$this->setName($name);
27
		$this->setEmail($email);
28
		$this->setPassword($password);
29
		$this->setGroup($Group);
30
	}
31
	function getAddress() {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
32
		return $this->address;
33
	}
34
35
	function setAddress($address) {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
36
		$this->address = $address;
37
	}	
38
	
39
	function getEmail() {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
40
		return $this->email;
41
	}
42
43
	function getName() {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
44
		return $this->name;
45
	}
46
47
	function getPassword() {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
48
		return $this->password;
49
	}
50
51
	function getGroup() {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
52
		return $this->group;
53
	}
54
55
	function setEmail($email) {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
56
		$this->email = $email;
57
	}
58
59
	function setName($name) {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
60
		$this->name = $name;
61
	}
62
63
	function setPassword($password) {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
64
		$this->password = $password;
65
	}
66
67
	function setGroup($group) {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
68
		$this->group = $group;
69
	}
70
71
72
}
73