Completed
Push — master ( aba493...5356ed )
by Ruud
315:38 queued 305:00
created

src/Kunstmaan/TaggingBundle/Entity/Tagging.php (2 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Kunstmaan\TaggingBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use DoctrineExtensions\Taggable\Entity\Tag as BaseTag;
7
use DoctrineExtensions\Taggable\Entity\Tagging as BaseTagging;
8
9
/**
10
 * @ORM\Entity()
11
 * @ORM\Table(name="kuma_taggings",indexes={@ORM\Index(name="kuma_taggings_type_index", columns={"resource_type"})})
12
 */
13
class Tagging extends BaseTagging
14
{
15
    /**
16
     * @ORM\Id
17
     * @ORM\Column(type="bigint")
18
     * @ORM\GeneratedValue(strategy="AUTO")
19
     */
20
    protected $id;
21
22
    /**
23
     * @ORM\ManyToOne(targetEntity="Kunstmaan\TaggingBundle\Entity\Tag", inversedBy="tagging")
24
     * @ORM\JoinColumn(name="tag_id", referencedColumnName="id", onDelete="CASCADE")
25
     */
26
    protected $tag;
27
28
    /**
29
     * @ORM\Column(name="resource_type", type="string")
30
     */
31
    protected $resourceType;
32
33
    /**
34
     * @ORM\Column(name="resource_id", type="string")
35
     */
36
    protected $resourceId;
37
38
    /**
39
     * @ORM\Column(name="created_at", type="datetime")
40
     */
41
    protected $createdAt;
42
43
    /**
44
     * @ORM\Column(name="updated_at", type="datetime")
45
     */
46
    protected $updatedAt;
47
48
    /**
49
     * Get id
50
     *
51
     * @return int
52
     */
53 1
    public function getId()
54
    {
55 1
        return $this->id;
56
    }
57
58
    /**
59
     * Set id
60
     *
61
     * @param int $id The unique identifier
62
     */
63 1
    public function setId($id)
64
    {
65 1
        $this->id = $id;
66 1
    }
67
68
    /**
69
     * Set tag
70
     *
71
     * @param $tag
72
     */
73 1
    public function setTag(BaseTag $tag)
74
    {
75 1
        $this->tag = $tag;
76 1
    }
77
78
    /**
79
     * Get tag
80
     *
81
     * @return Tag
82
     */
83 1
    public function getTag()
84
    {
85 1
        return $this->tag;
86
    }
87
88
    /**
89
     * Set resourceType
90
     *
91
     * @param $resourceType
92
     */
93 1
    public function setResourceType($resourceType)
94
    {
95 1
        $this->resourceType = $resourceType;
96 1
    }
97
98
    /**
99
     * Get resourceType
100
     *
101
     * @return string
102
     */
103 1
    public function getResourceType()
104
    {
105 1
        return $this->resourceType;
106
    }
107
108
    /**
109
     * Set resourceId
110
     *
111
     * @param $resourceId
112
     */
113 1
    public function setResourceId($resourceId)
114
    {
115 1
        $this->resourceId = $resourceId;
116 1
    }
117
118
    /**
119
     * Get resourceId
120
     *
121
     * @return string
122
     */
123 1
    public function getResourceId()
124
    {
125 1
        return $this->resourceId;
126
    }
127
128
    /**
129
     * set createdAt
130
     *
131
     * @param $createdAt
132
     */
133 1
    public function setCreatedAt(\DateTime $createdAt)
134
    {
135 1
        $this->createdAt = $createdAt;
136 1
    }
137
138
    /**
139
     * Get createdAt
140
     *
141
     * @return datetime
0 ignored issues
show
Should the return type not be \DateTime?

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...
142
     */
143 1
    public function getCreatedAt()
144
    {
145 1
        return $this->createdAt;
146
    }
147
148
    /**
149
     * Set UpdatedAt
150
     *
151
     * @param $updatedAt
152
     */
153 1
    public function setUpdatedAt(\DateTime $updatedAt)
154
    {
155 1
        $this->updatedAt = $updatedAt;
156 1
    }
157
158
    /**
159
     * Get updatedAt
160
     *
161
     * @return datetime
0 ignored issues
show
Should the return type not be \DateTime?

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...
162
     */
163 1
    public function getUpdatedAt()
164
    {
165 1
        return $this->updatedAt;
166
    }
167
}
168