Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
36 | protected function buildCollection(array $data) |
||
37 | { |
||
38 | $collection = new Collection(); |
||
39 | foreach ($data as $row) { |
||
40 | foreach (array("createdAt", "updatedAt", "timestamp", "startTime", "endTime") as $key) { |
||
41 | if (array_key_exists($key, $row)) { |
||
42 | $row[$key] = new \DateTime($row[$key]); |
||
43 | } |
||
44 | } |
||
45 | $model = new Model($row, $this); |
||
46 | $collection->add($model); |
||
47 | } |
||
48 | return $collection; |
||
49 | } |
||
50 | |||
71 |