Completed
Push — master ( 175f05...5ac193 )
by Bukashk0zzz
04:34
created

OfferArtistTitle   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 119
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 10
lcom 1
cbo 1
dl 0
loc 119
rs 10
c 0
b 0
f 0

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 0 4 1
A getArtist() 0 4 1
A setArtist() 0 6 1
A getTitle() 0 4 1
A setTitle() 0 6 1
A getYear() 0 4 1
A setYear() 0 6 1
A getMedia() 0 4 1
A setMedia() 0 6 1
A getOptions() 0 9 1
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
 * @author Denis Golubovskiy <[email protected]>
18
 */
19
class OfferArtistTitle extends AbstractOffer
20
{
21
    /**
22
     * @var string
23
     */
24
    private $artist;
25
26
    /**
27
     * @var string
28
     */
29
    private $title;
30
31
    /**
32
     * @var int
33
     */
34
    private $year;
35
36
    /**
37
     * @var string
38
     */
39
    private $media;
40
41
    /**
42
     * @return string
43
     */
44
    public function getType()
45
    {
46
        return 'artist.title';
47
    }
48
49
    /**
50
     * @return string
51
     */
52
    public function getArtist()
53
    {
54
        return $this->artist;
55
    }
56
57
    /**
58
     * @param string $artist
59
     * @return OfferArtistTitle
60
     */
61
    public function setArtist($artist)
62
    {
63
        $this->artist = $artist;
64
65
        return $this;
66
    }
67
68
    /**
69
     * @return string
70
     */
71
    public function getTitle()
72
    {
73
        return $this->title;
74
    }
75
76
    /**
77
     * @param string $title
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
     * @return OfferArtistTitle
98
     */
99
    public function setYear($year)
100
    {
101
        $this->year = $year;
102
103
        return $this;
104
    }
105
106
    /**
107
     * @return string
108
     */
109
    public function getMedia()
110
    {
111
        return $this->media;
112
    }
113
114
    /**
115
     * @param string $media
116
     * @return OfferArtistTitle
117
     */
118
    public function setMedia($media)
119
    {
120
        $this->media = $media;
121
122
        return $this;
123
    }
124
125
    /**
126
     * @return array
127
     */
128
    protected function getOptions()
129
    {
130
        return [
131
            'artist' => $this->getArtist(),
132
            'title' => $this->getTitle(),
133
            'year' => $this->getYear(),
134
            'media' => $this->getMedia(),
135
        ];
136
    }
137
}
138