| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function __construct(\stdClass $response) |
||
| 24 | { |
||
| 25 | $news = collect(); |
||
| 26 | foreach ($response->newslist->data as $item) { |
||
| 27 | $news->push(new News( |
||
| 28 | $item->id, |
||
| 29 | $item->type, |
||
| 30 | $item->news, |
||
| 31 | $item->apiurl, |
||
| 32 | $item->tibiaurl, |
||
| 33 | new Carbon($item->date->date, $item->date->timezone) |
||
| 34 | )); |
||
| 35 | } |
||
| 36 | |||
| 37 | $this->newslist = new Newslist($response->newslist->type, $news); |
||
| 38 | |||
| 39 | parent::__construct($response); |
||
| 40 | } |
||
| 41 | |||
| 50 |