Completed
Push — master ( d61877...118139 )
by Ryan
08:24
created

Row   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 153
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 10
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 153
rs 10

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getKey() 0 4 1
A setKey() 0 6 1
A setButtons() 0 6 1
A getButtons() 0 4 1
A setColumns() 0 6 1
A getColumns() 0 4 1
A getTable() 0 4 1
A setTable() 0 6 1
A setEntry() 0 6 1
A getEntry() 0 4 1
1
<?php namespace Anomaly\Streams\Platform\Ui\Table\Component\Row;
2
3
use Anomaly\Streams\Platform\Ui\Button\ButtonCollection;
4
use Anomaly\Streams\Platform\Ui\Table\Component\Row\Contract\RowInterface;
5
use Anomaly\Streams\Platform\Ui\Table\Table;
6
use Illuminate\Support\Collection;
7
8
/**
9
 * Class Row
10
 *
11
 * @link          http://anomaly.is/streams-platform
12
 * @author        AnomalyLabs, Inc. <[email protected]>
13
 * @author        Ryan Thompson <[email protected]>
14
 * @package       Anomaly\Streams\Platform\Ui\Table\Component\Row
15
 */
16
class Row implements RowInterface
17
{
18
19
    /**
20
     * The row key.
21
     *
22
     * @var null
23
     */
24
    protected $key = null;
25
26
    /**
27
     * The row entry.
28
     *
29
     * @var mixed
30
     */
31
    protected $entry = null;
32
33
    /**
34
     * The row table.
35
     *
36
     * @var null|Table
37
     */
38
    protected $table = null;
39
40
    /**
41
     * The row columns.
42
     *
43
     * @var Collection
44
     */
45
    protected $columns;
46
47
    /**
48
     * The row buttons.
49
     *
50
     * @var ButtonCollection
51
     */
52
    protected $buttons;
53
54
    /**
55
     * Get the key.
56
     *
57
     * @return null
58
     */
59
    public function getKey()
60
    {
61
        return $this->key;
62
    }
63
64
    /**
65
     * Set the key.
66
     *
67
     * @param $key
68
     * @return $this
69
     */
70
    public function setKey($key)
71
    {
72
        $this->key = $key;
73
74
        return $this;
75
    }
76
77
    /**
78
     * Set the row buttons.
79
     *
80
     * @param $buttons
81
     * @return $this
82
     */
83
    public function setButtons($buttons)
84
    {
85
        $this->buttons = $buttons;
86
87
        return $this;
88
    }
89
90
    /**
91
     * Get the row buttons.
92
     *
93
     * @return mixed
94
     */
95
    public function getButtons()
96
    {
97
        return $this->buttons;
98
    }
99
100
    /**
101
     * Set the row columns.
102
     *
103
     * @param Collection $columns
104
     * @return $this
105
     */
106
    public function setColumns(Collection $columns)
107
    {
108
        $this->columns = $columns;
109
110
        return $this;
111
    }
112
113
    /**
114
     * Get the row columns.
115
     *
116
     * @return mixed
117
     */
118
    public function getColumns()
119
    {
120
        return $this->columns;
121
    }
122
123
    /**
124
     * Get the table.
125
     *
126
     * @return Table|null
127
     */
128
    public function getTable()
129
    {
130
        return $this->table;
131
    }
132
133
    /**
134
     * Set the table.
135
     *
136
     * @param Table $table
137
     * @return $this
138
     */
139
    public function setTable(Table $table)
140
    {
141
        $this->table = $table;
142
143
        return $this;
144
    }
145
146
    /**
147
     * Set the row entry.
148
     *
149
     * @param $entry
150
     * @return $this
151
     */
152
    public function setEntry($entry)
153
    {
154
        $this->entry = $entry;
155
156
        return $this;
157
    }
158
159
    /**
160
     * Get the row entry.
161
     *
162
     * @return mixed
163
     */
164
    public function getEntry()
165
    {
166
        return $this->entry;
167
    }
168
}
169