Completed
Pull Request — master (#24)
by Quentin
03:03
created

SerializableMock2   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 7
c 2
b 0
f 0
lcom 0
cbo 1
dl 0
loc 55
rs 10
1
<?php
2
3
namespace Majora\Framework\Serializer\Tests\Model;
4
5
use Majora\Framework\Serializer\Model\SerializableInterface;
6
use Majora\Framework\Serializer\Model\SerializableTrait;
7
8
class SerializableMock2 implements SerializableInterface
9
{
10
    use SerializableTrait;
11
12
    protected $id = 2;
13
    protected $label = 'mock_2_label';
14
    protected $table = array('mock_2_1', 'mock_2_1');
15
16
    public function getId()
17
    {
18
        return $this->id;
19
    }
20
21
    public function setId($id)
22
    {
23
        $this->id = $id;
24
25
        return $this;
26
    }
27
28
    public function getLabel()
29
    {
30
        return $this->label;
31
    }
32
33
    public function setLabel($label)
34
    {
35
        $this->label = $label;
36
37
        return $this;
38
    }
39
40
    public function getTable()
41
    {
42
        return $this->table;
43
    }
44
45
    public function setTable(array $table)
46
    {
47
        $this->table = $table;
48
49
        return $this;
50
    }
51
52
    /**
53
     * @see ScopableInterface::getScopes()
54
     */
55
    public static function getScopes()
56
    {
57
        return array(
58
            'default' => array('id', 'label', 'table'),
59
            'id' => 'id',
60
        );
61
    }
62
}
63