Skip to content

Commit d2fd4c0

Browse files
committed
fix compatibility with php 5.3
1 parent 09a0554 commit d2fd4c0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Toin0u/Geocoder/GeocoderServiceProvider.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,19 @@ public function boot() {
4646
*/
4747
public function register()
4848
{
49+
$app = $this->app;
50+
4951
$this->app['geocoder.adapter'] = $this->app->share(function() {
5052
return new CurlHttpAdapter;
5153
});
5254

53-
$this->app['geocoder.provider'] = $this->app->share(function() {
54-
return new FreeGeoIpProvider($this->app['geocoder.adapter']);
55+
$this->app['geocoder.provider'] = $this->app->share(function($app) {
56+
return new FreeGeoIpProvider($app['geocoder.adapter']);
5557
});
5658

57-
$this->app['geocoder'] = $this->app->share(function() {
59+
$this->app['geocoder'] = $this->app->share(function($app) {
5860
$geocoder = new Geocoder;
59-
$geocoder->registerProvider($this->app['geocoder.provider']);
61+
$geocoder->registerProvider($app['geocoder.provider']);
6062

6163
return $geocoder;
6264
});

0 commit comments

Comments
 (0)