Completed
Pull Request — master (#86)
by Loïc
02:29
created

Article::setTitle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of AppName.
5
 *
6
 * (c) Monofony
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace App\Entity;
13
14
use Doctrine\ORM\Mapping as ORM;
15
use JMS\Serializer\Annotation as JMS;
16
use Sylius\Component\Resource\Model\ResourceInterface;
17
use Symfony\Component\Validator\Constraints as Assert;
18
19
/**
20
 * @ORM\Entity
21
 * @ORM\Table(name="app_article")
22
 *
23
 * @JMS\ExclusionPolicy("all")
24
 */
25
class Article implements ResourceInterface
26
{
27
    use IdentifiableTrait;
28
29
    /**
30
     * @var string|null
31
     *
32
     * @ORM\Column(type="string")
33
     *
34
     * @Assert\NotBlank()
35
     *
36
     * @JMS\Expose
37
     * @JMS\Groups({"Default", "Detailed"})
38
     */
39
    private $title;
40
41
    /**
42
     * @return string|null
43
     */
44
    public function getTitle(): ?string
45
    {
46
        return $this->title;
47
    }
48
49
    /**
50
     * @param string|null $title
51
     */
52
    public function setTitle(?string $title): void
53
    {
54
        $this->title = $title;
55
    }
56
}
57