Completed
Push — master ( 016326...2f159d )
by Joachim
04:38
created

Brand::setSlug()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
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
     * @return int
26
     */
27
    public function getId(): int
28
    {
29
        return intval($this->id);
30
    }
31
32
    /**
33
     * @param int $id
34
     * @return Brand
35
     */
36
    public function setId(int $id) : BrandInterface
37
    {
38
        $this->id = $id;
39
        return $this;
40
    }
41
42
    /**
43
     * @return string
44
     */
45
    public function getSlug(): string
46
    {
47
        return (string)$this->slug;
48
    }
49
50
    /**
51
     * @param string $slug
52
     * @return Brand
53
     */
54
    public function setSlug(string $slug) : BrandInterface
55
    {
56
        $this->slug = $slug;
57
        return $this;
58
    }
59
60
    /**
61
     * @return string
62
     */
63
    public function getName(): string
64
    {
65
        return (string)$this->name;
66
    }
67
68
    /**
69
     * @param string $name
70
     * @return Brand
71
     */
72
    public function setName(string $name) : BrandInterface
73
    {
74
        $this->name = $name;
75
        return $this;
76
    }
77
}