Skip to content

Commit 61f962a

Browse files
committed
Fix TimeGeocoder (implement missing methods)
1 parent 4451d67 commit 61f962a

File tree

1 file changed

+31
-9
lines changed

1 file changed

+31
-9
lines changed

src/Geocoder/TimedGeocoder.php

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,48 @@ class TimedGeocoder implements Geocoder
2525

2626
public function __construct(Geocoder $delegate, Stopwatch $stopwatch)
2727
{
28-
$this->delegate = $delegate;
28+
$this->delegate = $delegate;
2929
$this->stopwatch = $stopwatch;
3030
}
3131

32+
/**
33+
* {@inheritDoc}
34+
*/
3235
public function geocode($value)
3336
{
34-
$this->stopwatch->start('geocode', 'geocoder');
35-
$result = $this->delegate->geocode($value);
36-
$this->stopwatch->stop('geocode');
37+
$this->stopwatch->start('geocode', 'geocoder');
38+
$result = $this->delegate->geocode($value);
39+
$this->stopwatch->stop('geocode');
3740

38-
return $result;
41+
return $result;
3942
}
4043

44+
/**
45+
* {@inheritDoc}
46+
*/
4147
public function reverse($latitude, $longitude)
4248
{
43-
$this->stopwatch->start('reverse', 'geocoder');
44-
$result = $this->delegate->reverse($latitude, $longitude);
45-
$this->stopwatch->stop('reverse');
49+
$this->stopwatch->start('reverse', 'geocoder');
50+
$result = $this->delegate->reverse($latitude, $longitude);
51+
$this->stopwatch->stop('reverse');
4652

47-
return $result;
53+
return $result;
54+
}
55+
56+
/**
57+
* {@inheritDoc}
58+
*/
59+
public function getLimit()
60+
{
61+
return $this->delegate->getLimit();
62+
}
63+
64+
/**
65+
* {@inheritDoc}
66+
*/
67+
public function limit($limit)
68+
{
69+
return $this->delegate->limit($limit);
4870
}
4971

5072
public function __call($method, $args)

0 commit comments

Comments
 (0)