Completed
Pull Request — master (#144)
by
unknown
12:41
created

Client   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 114
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setIp() 0 6 1
A getIp() 0 4 1
A setCountAttempts() 0 6 1
A getCountAttempts() 0 4 1
A setBanned() 0 6 1
A isBanned() 0 4 1
1
<?php
2
3
namespace AppBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * Client.
9
 *
10
 * @ORM\Table()
11
 * @ORM\Entity(repositoryClass="AppBundle\Repository\ClientRepository")
12
 */
13
class Client
14
{
15
    /**
16
     * @var int
17
     *
18
     * @ORM\Column(name="id", type="integer")
19
     * @ORM\Id
20
     * @ORM\GeneratedValue(strategy="AUTO")
21
     */
22
    private $id;
23
24
    /**
25
     * @var string
26
     *
27
     * @ORM\Column(name="ip", type="string", length=20, unique=true)
28
     */
29
    private $ip;
30
31
    /**
32
     * @var int
33
     *
34
     * @ORM\Column(name="countAttempts", type="integer")
35
     */
36
    private $countAttempts;
37
38
    /**
39
     * @var bool
40
     *
41
     * @ORM\Column(name="banned", type="boolean")
42
     */
43
    private $banned;
44
45
    /**
46
     * Get id.
47
     *
48
     * @return int
49
     */
50
    public function getId()
51
    {
52
        return $this->id;
53
    }
54
55
    /**
56
     * Set ip.
57
     *
58
     * @param string $ip
59
     *
60
     * @return Client
61
     */
62
    public function setIp($ip)
63
    {
64
        $this->ip = $ip;
65
66
        return $this;
67
    }
68
69
    /**
70
     * Get ip.
71
     *
72
     * @return string
73
     */
74
    public function getIp()
75
    {
76
        return $this->ip;
77
    }
78
79
    /**
80
     * Set countAttempts.
81
     *
82
     * @param int $countAttempts
83
     *
84
     * @return Client
85
     */
86
    public function setCountAttempts($countAttempts)
87
    {
88
        $this->countAttempts = $countAttempts;
89
90
        return $this;
91
    }
92
93
    /**
94
     * Get countAttempts.
95
     *
96
     * @return int
97
     */
98
    public function getCountAttempts()
99
    {
100
        return $this->countAttempts;
101
    }
102
103
    /**
104
     * Set ban.
105
     *
106
     * @param bool $banned
107
     *
108
     * @return Client
109
     */
110
    public function setBanned($banned)
111
    {
112
        $this->banned = $banned;
113
114
        return $this;
115
    }
116
117
    /**
118
     * Get banned.
119
     *
120
     * @return bool
121
     */
122
    public function isBanned()
123
    {
124
        return $this->banned;
125
    }
126
}
127