Issues (18)

Application/GeoIpRemoteServices/MaxMindOptions.php (4 issues)

Labels
Severity
1
<?php
2
3
namespace CodeblogPro\GeoLocation\Application\GeoIpRemoteServices;
4
5
use CodeblogPro\GeoLocation\Application\Interfaces\RemoteServicesOptions;
6
use Illuminate\Support\Facades\Config;
7
8
class MaxMindOptions implements RemoteServicesOptions
9
{
10
    public function isEnabled(): bool
11
    {
12
        return (bool)(Config('geolocation.maxmind.enabled') ?? false);
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

12
        return (bool)(/** @scrutinizer ignore-call */ Config('geolocation.maxmind.enabled') ?? false);
Loading history...
13
    }
14
15
    public function getSort(): int
16
    {
17
        return (int)(Config('geolocation.maxmind.sort') ?? 0);
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
        return (int)(/** @scrutinizer ignore-call */ Config('geolocation.maxmind.sort') ?? 0);
Loading history...
18
    }
19
20
    public function getKey(): string
21
    {
22
        return 'Token ' . Config('geolocation.maxmind.key');
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

22
        return 'Token ' . /** @scrutinizer ignore-call */ Config('geolocation.maxmind.key');
Loading history...
23
    }
24
25
    public function getUrl(): string
26
    {
27
        return Config('geolocation.maxmind.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

27
        return /** @scrutinizer ignore-call */ Config('geolocation.maxmind.url');
Loading history...
28
    }
29
}
30