Skip to content

Commit bdd2175

Browse files
authored
Removed code not used (#159)
* Removed code not used * cs
1 parent 2127237 commit bdd2175

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

DependencyInjection/BazingaGeocoderExtension.php

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
use Geocoder\Plugin\Plugin\LocalePlugin;
2323
use Geocoder\Plugin\Plugin\LoggerPlugin;
2424
use Geocoder\Plugin\PluginProvider;
25-
use Geocoder\Provider\Cache\ProviderCache;
2625
use Symfony\Component\Config\Definition\Processor;
2726
use Symfony\Component\Config\FileLocator;
2827
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -154,39 +153,6 @@ public function configureProviderPlugins(ContainerBuilder $container, array $con
154153
}, $plugins);
155154
}
156155

157-
/**
158-
* Add cache to a provider if needed.
159-
*
160-
* @param ContainerBuilder $
161-
* @param string $serviceId
162-
* @param array $providerConfig
163-
*/
164-
private function configureCache(ContainerBuilder $container, string $serviceId, array $providerConfig)
165-
{
166-
if (null === $providerConfig['cache'] && null === $providerConfig['cache_lifetime']) {
167-
return;
168-
}
169-
170-
if (!class_exists(ProviderCache::class)) {
171-
throw new \LogicException('You must install "geocoder-php/cache-provider" to use cache.');
172-
}
173-
174-
if (null === $cacheServiceId = $providerConfig['cache']) {
175-
if (!$container->has('app.cache')) {
176-
throw new \LogicException('You need to specify a service for cache.');
177-
}
178-
$cacheServiceId = 'app.cache';
179-
}
180-
181-
$container->register($serviceId.'.cache', ProviderCache::class)
182-
->setDecoratedService($serviceId)
183-
->setArguments([
184-
new Reference($serviceId.'.cache.inner'),
185-
new Reference($cacheServiceId),
186-
$providerConfig['cache_lifetime'],
187-
]);
188-
}
189-
190156
/**
191157
* {@inheritdoc}
192158
*/

0 commit comments

Comments
 (0)