| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | 1 | public function getUser(string $phoneNumber): array |
|
| 27 | { |
||
| 28 | 1 | $phoneNumber = substr($phoneNumber, -9); |
|
| 29 | |||
| 30 | 1 | $userUri = $this->config->get('airtel-money.kyc.user_uri'); |
|
| 31 | |||
| 32 | 1 | $userUri = str_replace(':phoneNumber', $phoneNumber, $userUri); |
|
| 33 | |||
| 34 | 1 | $response = $this->http->request('GET', $userUri); |
|
| 35 | |||
| 36 | 1 | return json_decode((string) $response->getBody(), true); |
|
| 37 | } |
||
| 39 |