BaseModel   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 58
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getDataSource() 0 4 1
A setDataSource() 0 6 1
A getRawData() 0 4 1
A setRawData() 0 6 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
}