@@ -26,26 +26,26 @@ final class ProviderCache implements Provider
2626 /**
2727 * @var Provider
2828 */
29- private $ realProvider ;
29+ protected $ realProvider ;
3030
3131 /**
3232 * @var CacheInterface
3333 */
34- private $ cache ;
34+ protected $ cache ;
3535
3636 /**
3737 * How log a result is going to be cached.
3838 *
3939 * @var int|null
4040 */
41- private $ lifetime ;
41+ protected $ lifetime ;
4242
4343 /**
4444 * @param Provider $realProvider
4545 * @param CacheInterface $cache
4646 * @param int $lifetime
4747 */
48- public function __construct (Provider $ realProvider , CacheInterface $ cache , int $ lifetime = null )
48+ final public function __construct (Provider $ realProvider , CacheInterface $ cache , int $ lifetime = null )
4949 {
5050 $ this ->realProvider = $ realProvider ;
5151 $ this ->cache = $ cache ;
@@ -55,7 +55,7 @@ public function __construct(Provider $realProvider, CacheInterface $cache, int $
5555 /**
5656 * {@inheritdoc}
5757 */
58- public function geocodeQuery (GeocodeQuery $ query ): Collection
58+ final public function geocodeQuery (GeocodeQuery $ query ): Collection
5959 {
6060 $ cacheKey = $ this ->getCacheKey ($ query );
6161 if (null !== $ result = $ this ->cache ->get ($ cacheKey )) {
@@ -71,7 +71,7 @@ public function geocodeQuery(GeocodeQuery $query): Collection
7171 /**
7272 * {@inheritdoc}
7373 */
74- public function reverseQuery (ReverseQuery $ query ): Collection
74+ final public function reverseQuery (ReverseQuery $ query ): Collection
7575 {
7676 $ cacheKey = $ this ->getCacheKey ($ query );
7777 if (null !== $ result = $ this ->cache ->get ($ cacheKey )) {
@@ -92,7 +92,7 @@ public function getName(): string
9292 return sprintf ('%s (cache) ' , $ this ->realProvider ->getName ());
9393 }
9494
95- public function __call ($ method , $ args )
95+ final public function __call ($ method , $ args )
9696 {
9797 return call_user_func_array ([$ this ->realProvider , $ method ], $ args );
9898 }
@@ -102,7 +102,7 @@ public function __call($method, $args)
102102 *
103103 * @return string
104104 */
105- private function getCacheKey ($ query ): string
105+ protected function getCacheKey ($ query ): string
106106 {
107107 // Include the major version number of the geocoder to avoid issues unserializing.
108108 return 'v4 ' .sha1 ((string ) $ query );
0 commit comments