| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function checkIsbns($isbns) |
||
| 27 | { |
||
| 28 | $response = []; |
||
| 29 | foreach ($isbns as $isbn) { |
||
| 30 | $isbn = preg_replace('/[^0-9]/', '', $isbn); |
||
| 31 | $url = sprintf('%s/%s?%s', $this->baseUrl, $isbn, $this->makeQuery()); |
||
| 32 | |||
| 33 | // TODO: Use Guzzle, so we can mock and test |
||
| 34 | $response[$isbn] = json_decode(file_get_contents($url), true); |
||
| 35 | } |
||
| 36 | |||
| 37 | return new XisbnResponse($response); |
||
| 38 | } |
||
| 39 | } |
||
| 40 |