Completed
Pull Request — 5.0 (#2162)
by Kevin
14:33
created

ArticleBundle/Entity/AbstractCategory.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 AbstractCategory 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
    /**
36
     * Set name
37
     *
38
     * @param string $name
39
     */
40
    public function setName($name)
41
    {
42
        $this->name = $name;
43
    }
44
45
    /**
46
     * Get name
47
     *
48
     * @return string
49
     */
50
    public function getName()
51
    {
52
        return $this->name;
53
    }
54
55
    /**
56
     * @return mixed
57
     */
58
    public function getLocale()
59
    {
60
        return $this->locale;
61
    }
62
63
    /**
64
     * @param mixed $locale
65
     */
66
    public function setLocale($locale)
67
    {
68
        $this->locale = $locale;
69
    }
70
71
    /**
72
     * @return \DateTime
73
     */
74
    public function getDeletedAt()
75
    {
76
        return $this->deletedAt;
77
    }
78
79
    /**
80
     * @param \DateTime $deletedAt
81
     */
82
    public function setDeletedAt($deletedAt)
83
    {
84
        $this->deletedAt = $deletedAt;
85
    }
86
87
    /**
88
     * @return string
89
     */
90
    public function __toString()
91
    {
92
        return $this->getName();
93
    }
94
}
95
96