| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | 1 | public static function fromResponse(Response $response) |
|
| 19 | { |
||
| 20 | 1 | return new static(array_map(function ($entity) { |
|
| 21 | 1 | return new Tafsir([ |
|
| 22 | 1 | 'id' => $entity['tafsir_id'], |
|
| 23 | 1 | 'name' => $entity['aya_name'], |
|
| 24 | 1 | 'surat_number' => $entity['sura_id'], |
|
| 25 | 1 | 'ayat_number' => $entity['aya_number'], |
|
| 26 | 1 | 'mufasir' => $entity['mufasir'], |
|
| 27 | 1 | 'text' => $entity['text'], |
|
| 28 | 1 | 'html' => $entity['html'] ?? null, |
|
| 29 | ]); |
||
| 30 | 1 | }, data_get($response->json(), 'data', []))); |
|
| 31 | } |
||
| 33 |