please split this into subfunctions 

```
foreach ($this->appbox->get_databoxes() as $databox) {
    $data[$databox->get_sbas_id()] = $this->getDataboxSummary($databox);

}
```

and so on..

That would avoid some errors like below