Conditions | 7 |
Paths | 12 |
Total Lines | 23 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 56 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | { |
||
18 | foreach ($names as $name => $attribute) { |
||
19 | if (is_int($name)) { |
||
20 | $name = $attribute; |
||
21 | } |
||
22 | |||
23 | $this->addColumn($name, function ($model) use ($attribute) { |
||
24 | return $model->getAttribute($attribute); |
||
25 | }, is_int($order) ? $order++ : $order); |
||
26 | } |
||
27 | |||
28 | return $this; |
||
29 | } |
||
30 | } |
||
31 |