Conditions | 3 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
46 | public function toArray() |
||
47 | { |
||
48 | $array = []; |
||
49 | |||
50 | foreach (parent::toArray() as $item) { |
||
51 | $name = $item->find($this->getAttributeName()); |
||
52 | |||
53 | if (!empty($name)) { |
||
54 | $array[] = [ |
||
55 | 'field' => $this->getAttributeName(), |
||
56 | 'name' => $name, |
||
57 | 'value' => $item->find('@count'), |
||
58 | ]; |
||
59 | } |
||
60 | } |
||
61 | |||
62 | return $array; |
||
63 | } |
||
64 | } |
||
65 |