User   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 7
c 2
b 0
f 0
lcom 1
cbo 0
dl 0
loc 44
rs 10

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 3 1
A setId() 0 4 1
A getName() 0 3 1
A setName() 0 4 1
A getWard() 0 3 1
A setWard() 0 4 1
A toString() 0 3 1
1
<?php
2
3
/**
4
 * Ward
5
 *
6
 * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
7
 * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
8
 *
9
 * Permission is hereby granted to use or copy this program
10
 * for any purpose, provided the above notices are retained on all copies.
11
 * Permission to modify the code and to distribute modified code is granted,
12
 * provided the above notices are retained, and a notice that the code was
13
 * modified is included with the above copyright notice.
14
 *
15
 * @category  Wp
16
 * @package   Punction
17
 * @author    Andrzej Marcinkowski <[email protected]>
18
 * @copyright 2014 Wojewódzki Szpital Zespolony, Kalisz
19
 * @license   MIT http://opensource.org/licenses/MIT
20
 * @version   1.0 $Format:%H$
21
 * @link      http://
22
 * @since     File available since Release 1.0.0
23
 * PHP Version 5
24
 */
25
namespace Hospitalplugin\Entities;
26
27
/**
28
 * User
29
 *
30
 * @category Wp
31
 * @package Punction
32
 * @author Andrzej Marcinkowski <[email protected]>
33
 * @copyright 2014 Wojewódzki Szpital Zespolony, Kalisz
34
 * @license MIT http://opensource.org/licenses/MIT
35
 * @version 1.0 $Format:%H$
36
 * @link http://
37
 * @since File available since Release 1.0.0
38
 *       
39
 *        @Entity
40
 *        @Table(name="hospital_user",
41
 *        options={"collate"="utf8_polish_ci", "charset"="utf8", "engine"="MyISAM"},
42
 *        indexes={@index(name="name_idx", columns={"name"})})
43
 */
44
class User {
45
	
46
	/**
47
	 * id
48
	 * @Id @Column(type="integer", nullable=false) @GeneratedValue
49
	 */
50
	protected $id;
51
	
52
	/**
53
	 * name
54
	 * @Column(type="string")
55
	 */
56
	protected $name;
57
	
58
	/**
59
	 * @ManyToOne(targetEntity="Hospitalplugin\Entities\Ward", inversedBy="users")
60
	 * @JoinColumn(name="ward_id", referencedColumnName="id")
61
	 */
62
	private $ward;
63
	public function getId() {
64
		return $this->id;
65
	}
66
	public function setId($id) {
67
		$this->id = $id;
68
		return $this;
69
	}
70
	public function getName() {
71
		return $this->name;
72
	}
73
	public function setName($name) {
74
		$this->name = $name;
75
		return $this;
76
	}
77
	public function getWard() {
78
		return $this->ward;
79
	}
80
	public function setWard($ward) {
81
		$this->ward = $ward;
82
		return $this;
83
	}
84
	public function toString() {
85
		return $this->getId() . $this->getName() . $this->getWard();
86
	}
87
}
88
89
90