Completed
Push — master ( 4be93f...79933c )
by Guillaume
11:24
created

Cible::setManuallyAdded()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace Starkerxp\CampagneBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Starkerxp\StructureBundle\Entity\Entity;
7
8
/**
9
 * Cible
10
 *
11
 * @ORM\Table(name="campagne_cible")
12
 * @ORM\Entity(repositoryClass="Starkerxp\CampagneBundle\Repository\CibleRepository")
13
 */
14
class Cible extends Entity
15
{
16
    /**
17
     * @var int
18
     *
19
     * @ORM\Column(name="id", type="integer")
20
     * @ORM\Id
21
     * @ORM\GeneratedValue(strategy="AUTO")
22
     */
23
    protected $id;
24
25
    /**
26
     * @var bool
27
     *
28
     * @ORM\Column(name="cible_id", type="integer", length=11, nullable=false)
29
     */
30
    protected $cible;
31
32
    /**
33
     * @var Campagne
34
     *
35
     * @ORM\ManyToOne(targetEntity="Campagne", cascade="persist")
36
     * @ORM\JoinColumn(name="campagne_id", referencedColumnName="id", nullable=false)
37
     */
38
    protected $campagne;
39
40
    /**
41
     * @var \DateTime
42
     *
43
     * @ORM\Column(name="date_last_exited", type="datetime", nullable=true)
44
     */
45
    protected $dateLastExited = null;
46
47
    /**
48
     * @var bool
49
     *
50
     * @ORM\Column(name="manually_removed", type="boolean")
51
     */
52
    protected $manuallyRemoved = false;
53
54
    /**
55
     * @var bool
56
     *
57
     * @ORM\Column(name="manually_added", type="boolean")
58
     */
59
    protected $manuallyAdded = false;
60
61
    /**
62
     * Get id
63
     *
64
     * @return integer
65
     */
66
    public function getId()
67
    {
68
        return $this->id;
69
    }
70
71
    /**
72
     * Set dateLastExited
73
     *
74
     * @param \DateTime $dateLastExited
75
     *
76
     * @return Cible
77
     */
78
    public function setDateLastExited($dateLastExited)
79
    {
80
        $this->dateLastExited = $dateLastExited;
81
82
        return $this;
83
    }
84
85
    /**
86
     * Get dateLastExited
87
     *
88
     * @return \DateTime
89
     */
90
    public function getDateLastExited()
91
    {
92
        return $this->dateLastExited;
93
    }
94
95
    /**
96
     * Set manuallyRemoved
97
     *
98
     * @param boolean $manuallyRemoved
99
     *
100
     * @return Cible
101
     */
102
    public function setManuallyRemoved($manuallyRemoved)
103
    {
104
        $this->manuallyRemoved = $manuallyRemoved;
105
106
        return $this;
107
    }
108
109
    /**
110
     * Get manuallyRemoved
111
     *
112
     * @return boolean
113
     */
114
    public function getManuallyRemoved()
115
    {
116
        return $this->manuallyRemoved;
117
    }
118
119
    /**
120
     * Set manuallyAdded
121
     *
122
     * @param boolean $manuallyAdded
123
     *
124
     * @return Cible
125
     */
126
    public function setManuallyAdded($manuallyAdded)
127
    {
128
        $this->manuallyAdded = $manuallyAdded;
129
130
        return $this;
131
    }
132
133
    /**
134
     * Get manuallyAdded
135
     *
136
     * @return boolean
137
     */
138
    public function getManuallyAdded()
139
    {
140
        return $this->manuallyAdded;
141
    }
142
143
    /**
144
     * Set cible
145
     *
146
     * @param integer $cible
147
     *
148
     * @return Cible
149
     */
150
    public function setCible($cible)
151
    {
152
        $this->cible = $cible;
0 ignored issues
show
Documentation Bug introduced by
The property $cible was declared of type boolean, but $cible is of type integer. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
153
154
        return $this;
155
    }
156
157
    /**
158
     * Get cible
159
     *
160
     * @return integer
0 ignored issues
show
Documentation introduced by
Should the return type not be boolean?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
161
     */
162
    public function getCible()
163
    {
164
        return $this->cible;
165
    }
166
167
    /**
168
     * Set campagne
169
     *
170
     * @param \Starkerxp\CampagneBundle\Entity\Campagne $campagne
171
     *
172
     * @return Cible
173
     */
174
    public function setCampagne(\Starkerxp\CampagneBundle\Entity\Campagne $campagne)
175
    {
176
        $this->campagne = $campagne;
177
178
        return $this;
179
    }
180
181
    /**
182
     * Get campagne
183
     *
184
     * @return \Starkerxp\CampagneBundle\Entity\Campagne
185
     */
186
    public function getCampagne()
187
    {
188
        return $this->campagne;
189
    }
190
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
191