Completed
Push — master ( b73efb...175f05 )
by Bukashk0zzz
03:39
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 toArray() 0 9 1
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
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 array
43
     */
44
    public function toArray()
45
    {
46
        return array_merge($this->getHeaderOptions(), [
47
            'artist' => $this->getArtist(),
48
            'title' => $this->getTitle(),
49
            'year' => $this->getYear(),
50
            'media' => $this->getMedia(),
51
        ], $this->getFooterOptions());
52
    }
53
54
    /**
55
     * @return string
56
     */
57
    public function getType()
58
    {
59
        return 'artist.title';
60
    }
61
62
    /**
63
     * @return string
64
     */
65
    public function getArtist()
66
    {
67
        return $this->artist;
68
    }
69
70
    /**
71
     * @param string $artist
72
     * @return OfferArtistTitle
73
     */
74
    public function setArtist($artist)
75
    {
76
        $this->artist = $artist;
77
78
        return $this;
79
    }
80
81
    /**
82
     * @return string
83
     */
84
    public function getTitle()
85
    {
86
        return $this->title;
87
    }
88
89
    /**
90
     * @param string $title
91
     * @return OfferArtistTitle
92
     */
93
    public function setTitle($title)
94
    {
95
        $this->title = $title;
96
97
        return $this;
98
    }
99
100
    /**
101
     * @return int
102
     */
103
    public function getYear()
104
    {
105
        return $this->year;
106
    }
107
108
    /**
109
     * @param int $year
110
     * @return OfferArtistTitle
111
     */
112
    public function setYear($year)
113
    {
114
        $this->year = $year;
115
116
        return $this;
117
    }
118
119
    /**
120
     * @return string
121
     */
122
    public function getMedia()
123
    {
124
        return $this->media;
125
    }
126
127
    /**
128
     * @param string $media
129
     * @return OfferArtistTitle
130
     */
131
    public function setMedia($media)
132
    {
133
        $this->media = $media;
134
135
        return $this;
136
    }
137
}
138