Cardlist   A
last analyzed

Complexity

Total Complexity 14

Size/Duplication

Total Lines 129
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
wmc 14
lcom 1
cbo 4
dl 0
loc 129
rs 10
c 0
b 0
f 0

13 Methods

Rating   Name   Duplication   Size   Complexity  
A setName() 0 6 1
A getName() 0 4 1
A setBoardId() 0 6 1
A getBoardId() 0 4 1
A setBoard() 0 4 1
A getBoard() 0 4 1
A setPosition() 0 6 1
A getPosition() 0 4 1
A setClosed() 0 6 1
A isClosed() 0 4 1
A setSubscribed() 0 6 1
A isSubscribed() 0 4 1
A getCards() 0 10 2
1
<?php
2
3
namespace Trello\Model;
4
5
/**
6
 * @codeCoverageIgnore
7
 */
8
class Cardlist extends AbstractObject implements CardlistInterface
9
{
10
    protected $apiName = 'list';
11
12
    protected $loadParams = array(
13
        'cards'  => 'all',
14
        'fields' => 'all',
15
    );
16
17
    /**
18
     * {@inheritdoc}
19
     */
20
    public function setName($name)
21
    {
22
        $this->data['name'] = $name;
23
24
        return $this;
25
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function getName()
31
    {
32
        return $this->data['name'];
33
    }
34
35
    /**
36
     * {@inheritdoc}
37
     */
38
    public function setBoardId($boardId)
39
    {
40
        $this->data['idBoard'] = $boardId;
41
42
        return $this;
43
    }
44
45
    /**
46
     * {@inheritdoc}
47
     */
48
    public function getBoardId()
49
    {
50
        return $this->data['idBoard'];
51
    }
52
53
    /**
54
     * {@inheritdoc}
55
     */
56
    public function setBoard(BoardInterface $board)
57
    {
58
        return $this->setBoardId($board->getId());
59
    }
60
61
    /**
62
     * {@inheritdoc}
63
     */
64
    public function getBoard()
65
    {
66
        return new Board($this->client, $this->getBoardId());
67
    }
68
69
    /**
70
     * {@inheritdoc}
71
     */
72
    public function setPosition($pos)
73
    {
74
        $this->data['pos'] = $pos;
75
76
        return $this;
77
    }
78
79
    /**
80
     * {@inheritdoc}
81
     */
82
    public function getPosition()
83
    {
84
        return $this->data['pos'];
85
    }
86
87
    /**
88
     * {@inheritdoc}
89
     */
90
    public function setClosed($closed)
91
    {
92
        $this->data['closed'] = $closed;
93
94
        return $this;
95
    }
96
97
    /**
98
     * {@inheritdoc}
99
     */
100
    public function isClosed()
101
    {
102
        return $this->data['closed'];
103
    }
104
105
    /**
106
     * {@inheritdoc}
107
     */
108
    public function setSubscribed($subscribed)
109
    {
110
        $this->data['subscribed'] = $subscribed;
111
112
        return $this;
113
    }
114
115
    /**
116
     * {@inheritdoc}
117
     */
118
    public function isSubscribed()
119
    {
120
        return $this->data['subscribed'];
121
    }
122
123
    /**
124
     * {@inheritdoc}
125
     */
126
    public function getCards()
127
    {
128
        $cards = array();
129
130
        foreach ($this->data['cards'] as $card) {
131
            $cards[] = new Card($this->client, $card['id']);
132
        }
133
134
        return $cards;
135
    }
136
}
137