Completed
Push — master ( 4bb011...4b99be )
by Guillaume
13:23
created

CampaignTarget   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 142
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 8
lcom 0
cbo 1
dl 0
loc 142
rs 10
c 0
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A setDateLastExited() 0 6 1
A getDateLastExited() 0 4 1
A setManuallyRemoved() 0 6 1
A getManuallyRemoved() 0 4 1
A setManuallyAdded() 0 6 1
A getManuallyAdded() 0 4 1
A setCampaign() 0 6 1
A getCampaign() 0 4 1
1
<?php
2
3
namespace Starkerxp\CampaignBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Starkerxp\StructureBundle\Entity\UserEntity;
7
8
/**
9
 * CampaignTarget
10
 *
11
 * @ORM\Table(name="campaign_target", indexes={
12
 *  @ORM\Index(columns={"created_at"}),
13
 *  @ORM\Index(columns={"updated_at"})
14
 * })
15
 * @ORM\Entity(repositoryClass="Starkerxp\CampaignBundle\Repository\CampaignCibleRepository")
16
 */
17
class CampaignTarget extends UserEntity
18
{
19
    //@todo remplacer cible par une gestion avec de 'lead' et 'leadAction'
20
    /**
21
     * @var bool
22
     *
23
     * @ORM\Column(name="lead_id", type="integer", length=11, nullable=true)
24
     */
25
    protected $lead;
26
27
    /**
28
     * @var bool
29
     *
30
     * @ORM\Column(name="lead_action_id", type="integer", length=11, nullable=true)
31
     */
32
    protected $leadAction;
33
34
    /**
35
     * @var Campaign
36
     *
37
     * @ORM\ManyToOne(targetEntity="Campaign", cascade="persist", inversedBy="cibles")
38
     * @ORM\JoinColumn(name="campaign_id", referencedColumnName="id", nullable=false)
39
     */
40
    protected $campaign;
41
42
    /**
43
     * @var \DateTime
44
     *
45
     * @ORM\Column(name="date_last_exited", type="datetime", nullable=true)
46
     */
47
    protected $dateLastExited = null;
48
49
    /**
50
     * @var bool
51
     *
52
     * @ORM\Column(name="manually_removed", type="boolean", options={"default": false})
53
     */
54
    protected $manuallyRemoved = false;
55
56
    /**
57
     * @var bool
58
     *
59
     * @ORM\Column(name="manually_added", type="boolean", options={"default": false})
60
     */
61
    protected $manuallyAdded = false;
62
63
    /**
64
     * Set dateLastExited
65
     *
66
     * @param \DateTime $dateLastExited
67
     *
68
     * @return CampaignTarget
69
     */
70
    public function setDateLastExited($dateLastExited)
71
    {
72
        $this->dateLastExited = $dateLastExited;
73
74
        return $this;
75
    }
76
77
    /**
78
     * Get dateLastExited
79
     *
80
     * @return \DateTime
81
     */
82
    public function getDateLastExited()
83
    {
84
        return $this->dateLastExited;
85
    }
86
87
    /**
88
     * Set manuallyRemoved
89
     *
90
     * @param boolean $manuallyRemoved
91
     *
92
     * @return CampaignTarget
93
     */
94
    public function setManuallyRemoved($manuallyRemoved)
95
    {
96
        $this->manuallyRemoved = $manuallyRemoved;
97
98
        return $this;
99
    }
100
101
    /**
102
     * Get manuallyRemoved
103
     *
104
     * @return boolean
105
     */
106
    public function getManuallyRemoved()
107
    {
108
        return $this->manuallyRemoved;
109
    }
110
111
    /**
112
     * Set manuallyAdded
113
     *
114
     * @param boolean $manuallyAdded
115
     *
116
     * @return CampaignTarget
117
     */
118
    public function setManuallyAdded($manuallyAdded)
119
    {
120
        $this->manuallyAdded = $manuallyAdded;
121
122
        return $this;
123
    }
124
125
    /**
126
     * Get manuallyAdded
127
     *
128
     * @return boolean
129
     */
130
    public function getManuallyAdded()
131
    {
132
        return $this->manuallyAdded;
133
    }
134
135
    /**
136
     * Set campaign
137
     *
138
     * @param \Starkerxp\CampaignBundle\Entity\Campaign $campaign
139
     *
140
     * @return CampaignTarget
141
     */
142
    public function setCampaign(\Starkerxp\CampaignBundle\Entity\Campaign $campaign)
143
    {
144
        $this->campaign = $campaign;
145
146
        return $this;
147
    }
148
149
    /**
150
     * Get campaign
151
     *
152
     * @return \Starkerxp\CampaignBundle\Entity\Campaign
153
     */
154
    public function getCampaign()
155
    {
156
        return $this->campaign;
157
    }
158
}
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...
159