Skip to content

Commit 7d4aae2

Browse files
fix(*): Fix errors on PHP 7.2 and 7.3
1 parent 57e3012 commit 7d4aae2

File tree

2 files changed

+42
-12
lines changed

2 files changed

+42
-12
lines changed

src/ApiCache.php

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,30 +29,54 @@
2929
*/
3030
class ApiCache
3131
{
32-
private LoggerInterface $logger;
32+
/**
33+
* @var LoggerInterface
34+
*/
35+
private $logger;
3336

34-
private ApiClient $apiClient;
37+
/**
38+
* @var ApiClient
39+
*/
40+
private $apiClient;
3541

3642
/** @var AbstractAdapter */
3743
private $adapter;
3844

39-
private Geolocation $geolocation;
45+
/**
46+
* @var Geolocation
47+
*/
48+
private $geolocation;
4049

4150
/** @var bool */
42-
private ?bool $liveMode = null;
51+
private $liveMode = false;
4352

44-
private int $cacheExpirationForCleanIp = 0;
53+
/**
54+
* @var int
55+
*/
56+
private $cacheExpirationForCleanIp = 0;
4557

46-
private int $cacheExpirationForBadIp = 0;
58+
/**
59+
* @var int
60+
*/
61+
private $cacheExpirationForBadIp = 0;
4762

4863
/** @var bool */
49-
private ?bool $warmedUp = null;
64+
private $warmedUp = false;
5065

51-
private string $fallbackRemediation;
66+
/**
67+
* @var string
68+
*/
69+
private $fallbackRemediation;
5270

53-
private array $geolocConfig;
71+
/**
72+
* @var array|null
73+
*/
74+
private $geolocConfig;
5475

55-
private array $cacheKey = [];
76+
/**
77+
* @var array
78+
*/
79+
private $cacheKey = [];
5680

5781
/**
5882
* @param LoggerInterface $logger The logger to use

src/Geolocation.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,15 @@
2323
*/
2424
class Geolocation
2525
{
26-
protected array $maxmindCountry = [];
26+
/**
27+
* @var array
28+
*/
29+
protected $maxmindCountry = [];
2730

28-
private array $resultTemplate = ['country' => '', 'not_found' => '', 'error' => ''];
31+
/**
32+
* @var string[]
33+
*/
34+
private $resultTemplate = ['country' => '', 'not_found' => '', 'error' => ''];
2935

3036
/**
3137
* Retrieve a country from a MaxMind database.

0 commit comments

Comments
 (0)