Completed
Pull Request — master (#311)
by
unknown
04:10
created

UploadImage   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 103
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 7
lcom 0
cbo 0
dl 0
loc 103
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getLanguage() 0 4 1
A getFileId() 0 4 1
A getDescription() 0 4 1
A getCopyrightHolder() 0 4 1
A getMimeType() 0 4 1
A getFilePath() 0 4 1
A __construct() 0 15 1
1
<?php
2
3
namespace CultuurNet\UDB3\Media\Commands;
4
5
use CultuurNet\UDB3\Language;
6
use CultuurNet\UDB3\Media\Properties\MIMEType;
7
use ValueObjects\Identity\UUID;
8
use ValueObjects\StringLiteral\StringLiteral;
9
10
class UploadImage
11
{
12
    /**
13
     * @var UUID
14
     */
15
    protected $fileId;
16
17
    /**
18
     * @var Language
19
     */
20
    protected $language;
21
22
    /**
23
     * @var StringLiteral
24
     */
25
    protected $description;
26
27
    /**
28
     * @var StringLiteral
29
     */
30
    protected $copyrightHolder;
31
32
    /**
33
     * @var MIMEType
34
     */
35
    protected $mimeType;
36
37
    /**
38
     * @var StringLiteral
39
     */
40
    protected $filePath;
41
    /**
42
     * @param UUID $fileId
43
     * @param MIMEType $mimeType
44
     * @param StringLiteral $description
45
     * @param StringLiteral $copyrightHolder
46
     * @param StringLiteral $filePath
47
     * @param Language $language
48
     */
49
    public function __construct(
50
        UUID $fileId,
51
        MIMEType $mimeType,
52
        StringLiteral $description,
53
        StringLiteral $copyrightHolder,
54
        StringLiteral $filePath,
55
        Language $language
56
    ) {
57
        $this->fileId = $fileId;
58
        $this->description = $description;
59
        $this->copyrightHolder = $copyrightHolder;
60
        $this->mimeType = $mimeType;
61
        $this->filePath = $filePath;
62
        $this->language = $language;
63
    }
64
65
    /**
66
     * @return Language
67
     */
68
    public function getLanguage()
69
    {
70
        return $this->language;
71
    }
72
73
    /**
74
     * @return UUID
75
     */
76
    public function getFileId()
77
    {
78
        return $this->fileId;
79
    }
80
81
    /**
82
     * @return StringLiteral
83
     */
84
    public function getDescription()
85
    {
86
        return $this->description;
87
    }
88
89
    /**
90
     * @return StringLiteral
91
     */
92
    public function getCopyrightHolder()
93
    {
94
        return $this->copyrightHolder;
95
    }
96
97
    /**
98
     * @return MIMEType
99
     */
100
    public function getMimeType()
101
    {
102
        return $this->mimeType;
103
    }
104
105
    /**
106
     * @return StringLiteral
107
     */
108
    public function getFilePath()
109
    {
110
        return $this->filePath;
111
    }
112
}
113