1 | <?php |
||
2 | |||
3 | namespace HopekellDev\DanArewa\Helpers; |
||
4 | |||
5 | use Illuminate\Support\Facades\Http; |
||
0 ignored issues
–
show
|
|||
6 | |||
7 | /** |
||
8 | * DanArewa's Identity Verification laravel package |
||
9 | * @author Hope Ezenwa- Hopekell <[email protected]> |
||
10 | * @version 1 |
||
11 | **/ |
||
12 | |||
13 | class UserDetails |
||
14 | { |
||
15 | protected string $apiKey; |
||
16 | protected string $baseUrl; |
||
17 | |||
18 | /** |
||
19 | * Construct |
||
20 | */ |
||
21 | public function __construct(string $apiKey, string $baseUrl) |
||
22 | { |
||
23 | $this->apiKey = $apiKey; |
||
24 | $this->baseUrl = $baseUrl; |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * Get user's wallet balance |
||
29 | * |
||
30 | * @return array|null |
||
31 | */ |
||
32 | public function walletBalance(): ?array |
||
33 | { |
||
34 | $response = Http::withHeaders([ |
||
35 | 'Authorization' => "Bearer {$this->apiKey}", |
||
36 | 'Content-Type' => 'application/json', |
||
37 | ])->get("{$this->baseUrl}/user/wallet"); |
||
38 | |||
39 | return $response->json() ?? null; |
||
40 | } |
||
41 | |||
42 | } |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths