Test::__toString()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace DoctrineORMModuleTest\Assets\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * @ORM\Entity
9
 * @ORM\Table(name="doctrine_orm_module_test")
10
 */
11
class Test
12
{
13
    /**
14
     * @ORM\Id
15
     * @ORM\Column(type="integer");
16
     * @ORM\GeneratedValue(strategy="AUTO")
17
     */
18
    protected $id;
19
20
    /**
21
     * @ORM\Column(type="string", nullable=true)
22
     */
23
    protected $username;
24
25
    /**
26
     * @ORM\Column(type="string", nullable=true)
27
     */
28
    protected $password;
29
30
    /**
31
     * @return int|null
32
     */
33
    public function getId()
34
    {
35
        return $this->id;
36
    }
37
38
    /**
39
     * @param string $password
40
     */
41
    public function setPassword($password)
42
    {
43
        $this->password = (string) $password;
44
    }
45
46
    /**
47
     * @return string|null
48
     */
49
    public function getPassword()
50
    {
51
        return $this->password;
52
    }
53
54
    /**
55
     * @param string $username
56
     */
57
    public function setUsername($username)
58
    {
59
        $this->username = (string) $username;
60
    }
61
62
    /**
63
     * @return string|null
64
     */
65
    public function getUsername()
66
    {
67
        return $this->username;
68
    }
69
70
    /**
71
     * Used for testing DoctrineEntity form element
72
     *
73
     * @return string
74
     */
75
    public function __toString()
76
    {
77
        return (string) $this->username;
78
    }
79
}
80