original_string: protected function injectServices(Container $app)
      {
          if (isset($app['profiler'])) {
              $app['geocoder.logger'] = function($app) {
                  return new \Geocoder\Logger\GeocoderLogger();
              };
  
              $app['geocoder'] = function($app) {
                  $geocoder = new \Geocoder\LoggableGeocoder();
                  $geocoder->setLogger($app['geocoder.logger']);
                  $geocoder->registerProvider($app['geocoder.provider']);
  
                  return $geocoder;
              };
          } else {
              $app['geocoder'] = function($app) {
                  $geocoder = new \Geocoder\Geocoder();
                  $geocoder->registerProvider($app['geocoder.provider']);
  
                  return $geocoder;
              };
          }
  
          $app['geocoder.provider'] = function($app) {
              return new \Geocoder\Provider\FreeGeoIpProvider($app['geocoder.adapter']);
          };
  
          $app['geocoder.adapter'] = function($app) {
              return new \Geocoder\HttpAdapter\CurlHttpAdapter();
          };
      }
code: protected function injectServices(Container $app)
      {
          if (isset($app['profiler'])) {
              $app['geocoder.logger'] = function($app) {
                  return new \Geocoder\Logger\GeocoderLogger();
              };
  
              $app['geocoder'] = function($app) {
                  $geocoder = new \Geocoder\LoggableGeocoder();
                  $geocoder->setLogger($app['geocoder.logger']);
                  $geocoder->registerProvider($app['geocoder.provider']);
  
                  return $geocoder;
              };
          } else {
              $app['geocoder'] = function($app) {
                  $geocoder = new \Geocoder\Geocoder();
                  $geocoder->registerProvider($app['geocoder.provider']);
  
                  return $geocoder;
              };
          }
  
          $app['geocoder.provider'] = function($app) {
              return new \Geocoder\Provider\FreeGeoIpProvider($app['geocoder.adapter']);
          };
  
          $app['geocoder.adapter'] = function($app) {
              return new \Geocoder\HttpAdapter\CurlHttpAdapter();
          };
      }
code_tokens: protected function injectServices ( Container $ app ) { if ( isset ( $ app [ 'profiler' ] ) ) { $ app [ 'geocoder.logger' ] = function ( $ app ) { return new \ Geocoder \ Logger \ GeocoderLogger ( ) ; } ; $ app [ 'geocoder' ] = function ( $ app ) { $ geocoder = new \ Geocoder \ LoggableGeocoder ( ) ; $ geocoder -> setLogger ( $ app [ 'geocoder.logger' ] ) ; $ geocoder -> registerProvider ( $ app [ 'geocoder.provider' ] ) ; return $ geocoder ; } ; } else { $ app [ 'geocoder' ] = function ( $ app ) { $ geocoder = new \ Geocoder \ Geocoder ( ) ; $ geocoder -> registerProvider ( $ app [ 'geocoder.provider' ] ) ; return $ geocoder ; } ; } $ app [ 'geocoder.provider' ] = function ( $ app ) { return new \ Geocoder \ Provider \ FreeGeoIpProvider ( $ app [ 'geocoder.adapter' ] ) ; } ; $ app [ 'geocoder.adapter' ] = function ( $ app ) { return new \ Geocoder \ HttpAdapter \ CurlHttpAdapter ( ) ; } ; }
docstring: Injects Geocoder related services in the application.
docstring_tokens: Injects Geocoder related services in the application .