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

Event   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 66
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 66
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getCampaign() 0 4 1
A setCampaign() 0 5 1
A setTemplate() 0 6 1
A getTemplate() 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
 * Event
10
 *
11
 * @ORM\Table(name="campaign_event", indexes={
12
 *  @ORM\Index(columns={"created_at"}),
13
 *  @ORM\Index(columns={"updated_at"})
14
 * })
15
 * @ORM\Entity(repositoryClass="Starkerxp\CampaignBundle\Repository\EventRepository")
16
 */
17
class Event extends UserEntity
18
{
19
20
    /**
21
     * @var Campaign
22
     *
23
     * @ORM\ManyToOne(targetEntity="Campaign", cascade="persist", inversedBy="events")
24
     * @ORM\JoinColumn(name="campaign_id", referencedColumnName="id", nullable=false)
25
     */
26
    protected $campaign;
27
28
    /**
29
     * @var Template
30
     *
31
     * @ORM\ManyToOne(targetEntity="Template", cascade="persist", inversedBy="events")
32
     * @ORM\JoinColumn(name="template_id", referencedColumnName="id", nullable=false)
33
     */
34
    protected $template;
35
36
37
    /**
38
     * Get campaign
39
     *
40
     * @return \Starkerxp\CampaignBundle\Entity\Campaign
41
     */
42
    public function getCampaign()
43
    {
44
        return $this->campaign;
45
    }
46
47
    /**
48
     * Set campaign
49
     *
50
     * @param \Starkerxp\CampaignBundle\Entity\Campaign $campaign
51
     *
52
     */
53
    public function setCampaign(\Starkerxp\CampaignBundle\Entity\Campaign $campaign)
54
    {
55
        $this->campaign = $campaign;
56
57
    }
58
59
    /**
60
     * Set template
61
     *
62
     * @param \Starkerxp\CampaignBundle\Entity\Template $template
63
     *
64
     * @return Event
65
     */
66
    public function setTemplate(\Starkerxp\CampaignBundle\Entity\Template $template)
67
    {
68
        $this->template = $template;
69
70
        return $this;
71
    }
72
73
    /**
74
     * Get template
75
     *
76
     * @return \Starkerxp\CampaignBundle\Entity\Template
77
     */
78
    public function getTemplate()
79
    {
80
        return $this->template;
81
    }
82
}
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...
83