Completed
Pull Request — master (#68)
by
unknown
06:56
created

Label   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 88
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 9
lcom 1
cbo 3
dl 0
loc 88
rs 10
c 0
b 0
f 0

9 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 4 1
A setName() 0 6 1
A getName() 0 4 1
A setColor() 0 6 1
A getColor() 0 4 1
A setBoardId() 0 6 1
A getBoardId() 0 4 1
A setBoard() 0 4 1
A getBoard() 0 4 1
1
<?php
2
3
namespace Trello\Model;
4
5
6
7
class Label extends AbstractObject implements LabelInterface
8
{
9
    protected $apiName = 'label';
10
11
    protected $loadParams = array(
12
        'fields'    => 'all',
13
        'board'     => true,
14
    );
15
16
    /**
17
     * {@inheritdoc}
18
     */
19
    public function getId()
20
    {
21
        return $this->data['id'];
22
    }
23
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function setName($name)
28
    {
29
        $this->data['name'] = $name;
30
31
        return $this;
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    public function getName()
38
    {
39
        return $this->data['name'];
40
    }
41
42
    /**
43
     * {@inheritdoc}
44
     */
45
    public function setColor($color)
46
    {
47
        $this->data['color'] = $color;
48
49
        return $this;
50
    }
51
52
    /**
53
     * {@inheritdoc}
54
     */
55
    public function getColor()
56
    {
57
        return $this->data['color'];
58
    }
59
60
61
    /**
62
     * {@inheritdoc}
63
     */
64
    public function setBoardId($boardId)
65
    {
66
        $this->data['idBoard'] = $boardId;
67
68
        return $this;
69
    }
70
71
    /**
72
     * {@inheritdoc}
73
     */
74
    public function getBoardId()
75
    {
76
        return $this->data['idBoard'];
77
    }
78
79
    /**
80
     * {@inheritdoc}
81
     */
82
    public function setBoard(BoardInterface $board)
83
    {
84
        return $this->setBoardId($board->getId());
85
    }
86
87
    /**
88
     * {@inheritdoc}
89
     */
90
    public function getBoard()
91
    {
92
        return new Board($this->client, $this->getBoardId());
93
    }
94
}
95