| Conditions | 2 |
| Paths | 2 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | protected function convertToObject($data) |
||
| 36 | { |
||
| 37 | $this->id = $data['id']; |
||
| 38 | $this->type = $data['type']; |
||
| 39 | $this->secret_key = $data['attributes']['secret_key']; |
||
| 40 | $this->status = $data['attributes']['status']; |
||
| 41 | $this->url = $data['attributes']['url']; |
||
| 42 | $this->updated_at = $data['attributes']['updated_at']; |
||
| 43 | $this->created_at = $data['attributes']['created_at']; |
||
| 44 | |||
| 45 | $events = collect(); |
||
| 46 | foreach ($data['attributes']['events'] as $event) |
||
| 47 | { |
||
| 48 | $events->push($event); |
||
| 49 | } |
||
| 50 | |||
| 51 | $this->events = $events; |
||
| 52 | |||
| 53 | return $this; |
||
| 54 | } |
||
| 55 | |||
| 71 |