Skip to content

Commit f29cce8

Browse files
norkunasjbelien
andauthored
Resolve some deprecations and remove igorw/get-in dependency (#1257)
* Remove `igorw/get-in` dependency to simplify code * Fix phpunit deprecation * Simplify phpunit's `->will($this->returnValue())` with `->willReturn()` * Simplify phpunit's `->will($this->returnCallback())` with `->willReturnCallback()` * Fix deprecated mock builder `setMethds` with `createPartialMock` * Remove deprecated phpstan `checkGenericClassInNonGenericObjectType` option * Bump phpunit to 9.6 --------- Co-authored-by: Jonathan Beliën <[email protected]>
1 parent 0fffb47 commit f29cce8

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

GeoPlugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ private function executeQuery(string $url): AddressCollection
8686

8787
$adminLevels = [];
8888

89-
$region = \igorw\get_in($data, ['geoplugin_regionName']);
90-
$regionCode = \igorw\get_in($data, ['geoplugin_regionCode']);
89+
$region = $data['geoplugin_regionName'] ?? null;
90+
$regionCode = $data['geoplugin_regionCode'] ?? null;
9191

9292
if (null !== $region || null !== $regionCode) {
9393
$adminLevels[] = ['name' => $region, 'code' => $regionCode, 'level' => 1];

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"require": {
1515
"php": "^8.0",
1616
"geocoder-php/common-http": "^4.0",
17-
"igorw/get-in": "^1.0",
1817
"willdurand/geocoder": "^4.0|^5.0"
1918
},
2019
"provide": {
@@ -23,7 +22,7 @@
2322
"require-dev": {
2423
"geocoder-php/provider-integration-tests": "^1.6.3",
2524
"php-http/message": "^1.0",
26-
"phpunit/phpunit": "^9.5"
25+
"phpunit/phpunit": "^9.6.11"
2726
},
2827
"extra": {
2928
"branch-alias": {

0 commit comments

Comments
 (0)