BaseModel::setRawData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
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
14
use Pbxg33k\Traits\PropertyTrait;
15
16
abstract class BaseModel
17
{
18
    use PropertyTrait;
19
20
    /**
21
     * Data source identifier
22
     *
23
     * @var string
24
     */
25
    protected $dataSource;
26
27
    /**
28
     * Raw data as array representation
29
     *
30
     * @var array
31
     */
32
    protected $rawData;
33
34
    /**
35
     * @return string
36
     */
37 3
    public function getDataSource()
38
    {
39 3
        return $this->dataSource;
40
    }
41
42
    /**
43
     * @param string $dataSource
44
     *
45
     * @return BaseModel
46
     */
47 13
    public function setDataSource($dataSource)
48
    {
49 13
        $this->dataSource = $dataSource;
50
51 13
        return $this;
52
    }
53
54
    /**
55
     * @return array
56
     */
57 1
    public function getRawData()
58
    {
59 1
        return $this->rawData;
60
    }
61
62
    /**
63
     * @param mixed $rawData
64
     *
65
     * @return BaseModel
66
     */
67 13
    public function setRawData($rawData)
68
    {
69 13
        $this->rawData = $rawData;
0 ignored issues
show
Documentation Bug introduced by
It seems like $rawData of type * is incompatible with the declared type array of property $rawData.

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...
70
71 13
        return $this;
72
    }
73
}