Completed
Push — 5.0 ( a48099...63af02 )
by
unknown
11:33
created

src/Kunstmaan/ArticleBundle/Entity/AbstractTag.php (1 issue)

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\ArticleBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Gedmo\Mapping\Annotation as Gedmo;
7
use Gedmo\Translatable\Translatable;
8
use Kunstmaan\AdminBundle\Entity\AbstractEntity;
9
use Symfony\Component\Validator\Constraints as Assert;
10
11 View Code Duplication
class AbstractTag extends AbstractEntity implements Translatable
0 ignored issues
show
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
12
{
13
    /**
14
     * @var string
15
     *
16
     * @ORM\Column(name="name", type="string", length=255)
17
     * @Assert\NotBlank()
18
     * @Gedmo\Translatable
19
     */
20
    protected $name;
21
22
    /**
23
     * @Gedmo\Locale
24
     */
25
    protected $locale;
26
27
    /**
28
     * @var \DateTime
29
     *
30
     * @ORM\Column(name="deleted_at", type="datetime", nullable=true)
31
     */
32
    protected $deletedAt;
33
34
    /**
35
     * Set name
36
     *
37
     * @param string $name
38
     */
39
    public function setName($name)
40
    {
41
        $this->name = $name;
42
    }
43
44
    /**
45
     * Get name
46
     *
47
     * @return string
48
     */
49
    public function getName()
50
    {
51
        return $this->name;
52
    }
53
54
    /**
55
     * @return mixed
56
     */
57
    public function getLocale()
58
    {
59
        return $this->locale;
60
    }
61
62
    /**
63
     * @param mixed $locale
64
     */
65
    public function setLocale($locale)
66
    {
67
        $this->locale = $locale;
68
    }
69
70
    /**
71
     * @return \DateTime
72
     */
73
    public function getDeletedAt()
74
    {
75
        return $this->deletedAt;
76
    }
77
78
    /**
79
     * @param \DateTime $deletedAt
80
     */
81
    public function setDeletedAt($deletedAt)
82
    {
83
        $this->deletedAt = $deletedAt;
84
    }
85
86
    /**
87
     * @return string
88
     */
89
    public function __toString()
90
    {
91
        return $this->getName();
92
    }
93
}
94
95