Add types to consts
This commit is contained in:
@@ -10,7 +10,7 @@ use Symfony\Contracts\HttpClient\ResponseInterface;
|
|||||||
|
|
||||||
class Geocoder
|
class Geocoder
|
||||||
{
|
{
|
||||||
private const API_URL = "https://nominatim.openstreetmap.org/search";
|
private const string API_URL = "https://nominatim.openstreetmap.org/search";
|
||||||
|
|
||||||
public function __construct(private HttpClientInterface $client) {}
|
public function __construct(private HttpClientInterface $client) {}
|
||||||
|
|
||||||
|
|||||||
@@ -12,12 +12,12 @@ use Pcm\GeocodeBundle\Tests\AppKernel;
|
|||||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Note we sleep 1s after requests to prevent breaking the API T&Cs
|
* We sleep 1 second after API calls to prevent breaking the API T&Cs.
|
||||||
*/
|
*/
|
||||||
class GeocodeTest extends KernelTestCase
|
class GeocodeTest extends KernelTestCase
|
||||||
{
|
{
|
||||||
// Buckingham Palace
|
// Buckingham Palace
|
||||||
private const POSTCODE = 'SW1A 1AA';
|
private const string POSTCODE = 'SW1A 1AA';
|
||||||
|
|
||||||
private Geocoder $geocoder;
|
private Geocoder $geocoder;
|
||||||
|
|
||||||
@@ -54,3 +54,4 @@ class GeocodeTest extends KernelTestCase
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user