Test Failed
Pull Request — develop (#22)
by Oguzhan
03:49
created

Artist::getType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
/*******************************************************************************
3
 * This file is part of the Pbxg33k\MusicInfo package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 *
8
 * (c) 2017 Oguzhan uysal. All rights reserved
9
 ******************************************************************************/
10
11
namespace Pbxg33k\MusicInfo\Model;
12
13
use Doctrine\Common\Collections\ArrayCollection;
14
15
class Artist extends BaseModel
16
{
17
    /**
18
     * Identifier
19
     *
20
     * @var string
21
     */
22
    protected $id;
23
24
    /**
25
     * Artist Name
26
     *
27
     * @var string
28
     */
29
    protected $name;
30
31
    /**
32
     * Image URL
33
     *
34
     * @var string
35
     */
36
    protected $image;
37
38
    /**
39
     * Artist Type
40
     *
41
     * @var string
42
     */
43
    protected $type;
44
45
    /**
46
     * URI to data source
47
     *
48
     * @var string
49
     */
50
    protected $uri;
51
52
    /**
53 3
     * @var SongArtist[]
54
     */
55 3
    protected $songs;
56
57
    public function __construct()
58
    {
59
        $this->songs = new ArrayCollection();
0 ignored issues
show
Documentation Bug introduced by
It seems like new \Doctrine\Common\Collections\ArrayCollection() of type object<Doctrine\Common\C...ctions\ArrayCollection> is incompatible with the declared type array<integer,object<Pbx...Info\Model\SongArtist>> of property $songs.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
60
    }
61
62
    /**
63 11
     * @return string
64
     */
65 11
    public function getId()
66
    {
67 11
        return $this->id;
68
    }
69
70
    /**
71
     * @param string $id
72
     *
73 3
     * @return Artist
74
     */
75 3
    public function setId($id)
76
    {
77
        $this->id = $id;
78
79
        return $this;
80
    }
81
82
    /**
83 13
     * @return string
84
     */
85 13
    public function getName()
86
    {
87 13
        return $this->name;
88
    }
89
90
    /**
91
     * @param string $name
92
     *
93 3
     * @return Artist
94
     */
95 3
    public function setName($name)
96
    {
97
        $this->name = $name;
98
99
        return $this;
100
    }
101
102
    /**
103 6
     * @return string
104
     */
105 6
    public function getImage()
106
    {
107 6
        return $this->image;
108
    }
109
110
    /**
111
     * @param string $image
112
     *
113 3
     * @return Artist
114
     */
115 3
    public function setImage($image)
116
    {
117
        $this->image = $image;
118
119
        return $this;
120
    }
121
122
    /**
123 9
     * @return string
124
     */
125 9
    public function getType()
126
    {
127 9
        return $this->type;
128
    }
129
130
    /**
131
     * @param string $type
132
     *
133 3
     * @return Artist
134
     */
135 3
    public function setType($type)
136
    {
137
        $this->type = $type;
138
139
        return $this;
140
    }
141
142
    /**
143 6
     * @return string
144
     */
145 6
    public function getUri()
146
    {
147 6
        return $this->uri;
148
    }
149
150
    /**
151
     * @param string $uri
152
     *
153
     * @return Artist
154
     */
155
    public function setUri($uri)
156
    {
157
        $this->uri = $uri;
158
159
        return $this;
160
    }
161
}
162