Passed
Push — develop ( 9af182...91a680 )
by Daniel
05:16 queued 26s
created

FileData::getImageData()   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
namespace Silverback\ApiComponentBundle\Dto\File;
4
5
use Symfony\Component\Serializer\Annotation\Groups;
6
7
/**
8
 * Class FileData
9
 * @package Silverback\ApiComponentBundle\Entity\Content
10
 * This class is to hold data about a file and is added into a File component during serialization
11
 */
12
class FileData
13
{
14
    /**
15
     * @Groups({"component", "content"})
16
     * @var string|null
17
     */
18
    private $publicPath;
19
20
    /**
21
     * @Groups({"component", "content"})
22
     * @var ImageMetadata|null
23
     */
24
    private $imageData;
25
26
    /**
27
     * @Groups({"component", "content"})
28
     * @var ImageMetadata[]|null
29
     */
30
    private $imagineData;
31
32
    /**
33
     * FileData constructor.
34
     * @param null|string $publicPath
35
     * @param null|ImageMetadata $imageData
36
     * @param null|ImageMetadata[] $imagineData
37
     */
38
    public function __construct(?string $publicPath, ?ImageMetadata $imageData, ?array $imagineData)
39
    {
40
        $this->publicPath = $publicPath;
41
        $this->imageData = $imageData;
42
        $this->imagineData = $imagineData;
43
    }
44
45
    /**
46
     * @return null|string
47
     */
48
    public function getPublicPath(): ?string
49
    {
50
        return $this->publicPath;
51
    }
52
53
    /**
54
     * @return null|ImageMetadata
55
     */
56
    public function getImageData(): ?ImageMetadata
57
    {
58
        return $this->imageData;
59
    }
60
61
    /**
62
     * @return null|ImageMetadata[]
63
     */
64
    public function getImagineData(): ?array
65
    {
66
        return $this->imagineData;
67
    }
68
}
69