diff --git a/src/Model/LatLongModel.php b/src/Model/LatLongModel.php index 4c0cfef..88bc3c9 100644 --- a/src/Model/LatLongModel.php +++ b/src/Model/LatLongModel.php @@ -9,7 +9,7 @@ namespace Pcm\GeocodeBundle\Model; * * @package Pcm\GeocodeBundle */ -class LatLongModel +final class LatLongModel { public function __construct(private float $latitude, private float $longitude) {} diff --git a/src/PcmGeocodeBundle.php b/src/PcmGeocodeBundle.php index a2f45a5..f700023 100644 --- a/src/PcmGeocodeBundle.php +++ b/src/PcmGeocodeBundle.php @@ -10,7 +10,7 @@ use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigura use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; use Symfony\Component\HttpKernel\Bundle\AbstractBundle; -class PcmGeocodeBundle extends AbstractBundle { +final class PcmGeocodeBundle extends AbstractBundle { public function loadExtension(array $config, ContainerConfigurator $container, ContainerBuilder $builder): void { $loader = new YamlFileLoader($builder, new FileLocator(__DIR__.'/../config/')); diff --git a/src/Service/Geocoder.php b/src/Service/Geocoder.php index b3ec623..12e7248 100644 --- a/src/Service/Geocoder.php +++ b/src/Service/Geocoder.php @@ -8,7 +8,7 @@ use Pcm\GeocodeBundle\Model\LatLongModel; use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\ResponseInterface; -class Geocoder +final class Geocoder { private const string API_URL = "https://nominatim.openstreetmap.org/search"; diff --git a/tests/AppKernel.php b/tests/AppKernel.php index 2d55c2d..de5283f 100644 --- a/tests/AppKernel.php +++ b/tests/AppKernel.php @@ -9,7 +9,7 @@ use Symfony\Bundle\FrameworkBundle\FrameworkBundle; use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\HttpKernel\Kernel; -class AppKernel extends Kernel +final class AppKernel extends Kernel { /** * @return array @@ -30,3 +30,4 @@ class AppKernel extends Kernel $loader->load(__DIR__.'/config_'.$this->getEnvironment().'.yml'); } } + diff --git a/tests/Service/GeocodeTest.php b/tests/Service/GeocodeTest.php index 073f0b8..a6fa965 100644 --- a/tests/Service/GeocodeTest.php +++ b/tests/Service/GeocodeTest.php @@ -14,7 +14,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; /** * We sleep 1 second after API calls to prevent breaking the API T&Cs. */ -class GeocodeTest extends KernelTestCase +final class GeocodeTest extends KernelTestCase { // Buckingham Palace private const string POSTCODE = 'SW1A 1AA'; diff --git a/tests/Trait/MappableTraitTest.php b/tests/Trait/MappableTraitTest.php index dd07c79..49a6436 100644 --- a/tests/Trait/MappableTraitTest.php +++ b/tests/Trait/MappableTraitTest.php @@ -8,7 +8,7 @@ use Pcm\GeocodeBundle\Entity\Interface\MappableInterface; use Pcm\GeocodeBundle\Entity\Trait\MappableTrait; use PHPUnit\Framework\TestCase; -class MappableTraitTest extends TestCase +final class MappableTraitTest extends TestCase { private const float COORD = 123.456;