Skip to content

Commit 823f020

Browse files
authored
Fixed some code smell (#709)
* Fixed type issues * Fixed code smell
1 parent cb4bfca commit 823f020

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

Model/Address.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,7 @@ public static function createFromArray(array $data)
244244
continue;
245245
}
246246

247-
$adminLevels[] = new AdminLevel(
248-
$adminLevel['level'],
249-
$name,
250-
$adminLevel['code'] ?? null
251-
);
247+
$adminLevels[] = new AdminLevel($adminLevel['level'], $name, $adminLevel['code'] ?? null);
252248
}
253249

254250
return new static(

Provider/AbstractProvider.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
namespace Geocoder\Provider;
1414

15-
use Geocoder\Geocoder;
1615
use Geocoder\Location;
1716
use Geocoder\Model\Address;
1817

StatefulGeocoder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function geocodeQuery(GeocodeQuery $query): Collection
103103
$query = $query->withBounds($this->bounds);
104104
}
105105

106-
$this->provider->geocodeQuery($query);
106+
return $this->provider->geocodeQuery($query);
107107
}
108108

109109
/**
@@ -116,7 +116,7 @@ public function reverseQuery(ReverseQuery $query): Collection
116116
$query->withLocale($this->locale);
117117
}
118118

119-
$this->provider->reverseQuery($query);
119+
return $this->provider->reverseQuery($query);
120120
}
121121

122122
/**

Tests/TimedGeocoderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class TimedGeocoderTest extends TestCase
2626
private $stopwatch;
2727

2828
/**
29-
* @var Provider
29+
* @var Provider|\PHPUnit_Framework_MockObject_MockObject
3030
*/
3131
private $delegate;
3232

0 commit comments

Comments
 (0)