Completed
Push — master ( 09ebf3...a2507a )
by Joachim
10s
created

Brand::getImages()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 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
    use ProductsAwareTrait,
10
        ImagesAwareTrait;
11
12
    /**
13
     * @var int
14
     */
15
    protected $id;
16
17
    /**
18
     * @var string
19
     */
20
    protected $slug;
21
22
    /**
23
     * @var string
24
     */
25
    protected $name;
26
27
    public function __construct()
28
    {
29
        $this->initializeImagesCollection();
30
        $this->initializeProductsCollection();
31
    }
32
33
    /**
34
     * {@inheritdoc}
35
     */
36
    public function __toString(): string
37
    {
38
        return (string) $this->getName();
39
    }
40
41
    /**
42
     * {@inheritdoc}
43
     */
44
    public function getId(): ?int
45
    {
46
        return $this->id;
47
    }
48
49
    /**
50
     * {@inheritdoc}
51
     */
52
    public function getSlug(): ?string
53
    {
54
        return $this->slug;
55
    }
56
57
    /**
58
     * {@inheritdoc}
59
     */
60
    public function setSlug(string $slug): void
61
    {
62
        $this->slug = $slug;
63
    }
64
65
    /**
66
     * {@inheritdoc}
67
     */
68
    public function getName(): ?string
69
    {
70
        return $this->name;
71
    }
72
73
    /**
74
     * {@inheritdoc}
75
     */
76
    public function setName(string $name): void
77
    {
78
        $this->name = $name;
79
    }
80
}
81