Conditions | 3 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | 4 | public function __construct(stdClass $data) |
|
16 | { |
||
17 | 4 | parent::__construct($data, 'report_creditResult'); |
|
18 | 4 | $this->items = []; |
|
19 | |||
20 | 4 | $items = $this->findInDescendent($data, 'report_creditResult', 'result', 'ReportTotalCredit'); |
|
21 | 4 | if (! is_array($items)) { |
|
22 | 2 | $items = []; |
|
23 | } |
||
24 | 4 | foreach ($items as $item) { |
|
25 | 2 | $this->items[] = [ |
|
26 | 2 | 'credit' => strval($item->credit), |
|
27 | 2 | 'date' => strval($item->date), |
|
28 | ]; |
||
43 |