| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | public function findTopPosts(string $id) |
||
| 41 | { |
||
| 42 | $url = Endpoint::exploreLocations($id); |
||
| 43 | $data = $this->fetchContentAsArray($url); |
||
| 44 | |||
| 45 | $this->throwEmptyContentExceptionIfEmpty($data); |
||
| 46 | |||
| 47 | $items = $this->exploreLocationsMapper->normalizeData(Post::class, $data); |
||
| 48 | foreach ($items as $item) { |
||
| 49 | yield $this->exploreLocationsMapper->populate(Post::class, $item); |
||
| 50 | } |
||
| 52 | } |