Add types to consts

This commit is contained in:
brabli
2024-08-05 12:01:33 +01:00
parent 84ba22f287
commit 5c87bf35d5
2 changed files with 4 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ use Symfony\Contracts\HttpClient\ResponseInterface;
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) {}

View File

@@ -12,12 +12,12 @@ use Pcm\GeocodeBundle\Tests\AppKernel;
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
{
// Buckingham Palace
private const POSTCODE = 'SW1A 1AA';
private const string POSTCODE = 'SW1A 1AA';
private Geocoder $geocoder;
@@ -54,3 +54,4 @@ class GeocodeTest extends KernelTestCase
};
}
}