| Conditions | 4 |
| Paths | 8 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | 46 | public function get() |
|
| 28 | { |
||
| 29 | 46 | if ($this->id) { |
|
| 30 | 12 | $this->setUpdatedTime(); |
|
| 31 | 12 | } |
|
| 32 | |||
| 33 | 46 | $custom_fields = []; |
|
| 34 | 46 | foreach ($this->custom_fields as $custom_field) { |
|
| 35 | 27 | $custom_fields[] = $custom_field->get(); |
|
| 36 | 46 | } |
|
| 37 | |||
| 38 | 46 | $fields = $this->getExistedValues($this->fieldList); |
|
| 39 | |||
| 40 | 46 | if (count($custom_fields)) { |
|
| 41 | 27 | $fields['custom_fields'] = $custom_fields; |
|
| 42 | 27 | } |
|
| 43 | |||
| 44 | 46 | return $fields; |
|
| 45 | } |
||
| 46 | } |