OfferArtistTitle::setMedia()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
/*
4
 * This file is part of the Bukashk0zzzYmlGenerator
5
 *
6
 * (c) Denis Golubovskiy <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Bukashk0zzz\YmlGenerator\Model\Offer;
13
14
/**
15
 * Class OfferArtistTitle
16
 */
17
class OfferArtistTitle extends AbstractOffer
18
{
19
    /**
20
     * @var string
21
     */
22
    private $artist;
23
24
    /**
25
     * @var string
26
     */
27
    private $title;
28
29
    /**
30
     * @var int
31
     */
32
    private $year;
33
34
    /**
35
     * @var string
36
     */
37
    private $media;
38
39
    /**
40
     * @return string
41
     */
42
    public function getType()
43
    {
44
        return 'artist.title';
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    public function getArtist()
51
    {
52
        return $this->artist;
53
    }
54
55
    /**
56
     * @param string $artist
57
     *
58
     * @return OfferArtistTitle
59
     */
60
    public function setArtist($artist)
61
    {
62
        $this->artist = $artist;
63
64
        return $this;
65
    }
66
67
    /**
68
     * @return string
69
     */
70
    public function getTitle()
71
    {
72
        return $this->title;
73
    }
74
75
    /**
76
     * @param string $title
77
     *
78
     * @return OfferArtistTitle
79
     */
80
    public function setTitle($title)
81
    {
82
        $this->title = $title;
83
84
        return $this;
85
    }
86
87
    /**
88
     * @return int
89
     */
90
    public function getYear()
91
    {
92
        return $this->year;
93
    }
94
95
    /**
96
     * @param int $year
97
     *
98
     * @return OfferArtistTitle
99
     */
100
    public function setYear($year)
101
    {
102
        $this->year = $year;
103
104
        return $this;
105
    }
106
107
    /**
108
     * @return string
109
     */
110
    public function getMedia()
111
    {
112
        return $this->media;
113
    }
114
115
    /**
116
     * @param string $media
117
     *
118
     * @return OfferArtistTitle
119
     */
120
    public function setMedia($media)
121
    {
122
        $this->media = $media;
123
124
        return $this;
125
    }
126
127
    /**
128
     * @return array
129
     */
130
    protected function getOptions()
131
    {
132
        return [
133
            'artist' => $this->getArtist(),
134
            'title' => $this->getTitle(),
135
            'year' => $this->getYear(),
136
            'media' => $this->getMedia(),
137
        ];
138
    }
139
}
140