Completed
Push — master ( c7b7bb...cf89b0 )
by Joachim
04:30
created

Brand::__toString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Loevgaard\SyliusBrandPlugin\Entity;
6
7
class Brand implements BrandInterface
8
{
9
    /**
10
     * @var int
11
     */
12
    protected $id;
13
14
    /**
15
     * @var string
16
     */
17
    protected $slug;
18
19
    /**
20
     * @var string
21
     */
22
    protected $name;
23
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function __toString(): string
28
    {
29
        return (string) $this->getName();
30
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    public function getId(): ?int
36
    {
37
        return $this->id;
38
    }
39
40
    /**
41
     * {@inheritdoc}
42
     */
43
    public function setId(int $id): BrandInterface
44
    {
45
        $this->id = $id;
46
47
        return $this;
48
    }
49
50
    /**
51
     * {@inheritdoc}
52
     */
53
    public function getSlug(): ?string
54
    {
55
        return $this->slug;
56
    }
57
58
    /**
59
     * {@inheritdoc}
60
     */
61
    public function setSlug(string $slug): BrandInterface
62
    {
63
        $this->slug = $slug;
64
65
        return $this;
66
    }
67
68
    /**
69
     * {@inheritdoc}
70
     */
71
    public function getName(): ?string
72
    {
73
        return $this->name;
74
    }
75
76
    /**
77
     * {@inheritdoc}
78
     */
79
    public function setName(string $name): BrandInterface
80
    {
81
        $this->name = $name;
82
83
        return $this;
84
    }
85
}
86