Issues (9)

src/DanArewa.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace HopekellDev\DanArewa;
4
5
use HopekellDev\DanArewa\Helpers\IpeClearance;
6
use HopekellDev\DanArewa\Helpers\UserDetails;
7
use HopekellDev\DanArewa\Helpers\Validation;
8
use HopekellDev\DanArewa\Helpers\Verifications;
9
10
class DanArewa
11
{
12
    protected string $baseUrl;
13
    protected string $apiKey;
14
15
    public function __construct()
16
    {
17
        $this->baseUrl = rtrim(config('danarewa.base_url'), '/');
0 ignored issues
show
The function config was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

17
        $this->baseUrl = rtrim(/** @scrutinizer ignore-call */ config('danarewa.base_url'), '/');
Loading history...
18
        $this->apiKey = config('danarewa.api_key');
19
    }
20
21
    public function verifications(): Verifications
22
    {
23
        return new Verifications($this->apiKey, $this->baseUrl);
24
    }
25
26
    public function ipeClearance(): IpeClearance
27
    {
28
        return new IpeClearance($this->apiKey, $this->baseUrl);
29
    }
30
31
    public function validation(): Validation
32
    {
33
        return new Validation($this->apiKey, $this->baseUrl);
34
    }
35
36
    public function userDetails(): UserDetails
37
    {
38
        return new UserDetails($this->apiKey, $this->baseUrl);
39
    }
40
}
41