From 67b2e8fbaa10977ece38103737590456419d040e Mon Sep 17 00:00:00 2001 From: Damien Overeem Date: Thu, 22 Sep 2022 10:43:22 +0200 Subject: [PATCH] Fixed namespace issues --- README.md | 2 +- .../{RdwApiClient.php => RDWOpenDataApiClient.php} | 4 ++-- .../{RdwApiEndpoints.php => RDWOpenDataApiEndpoints.php} | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename src/RDW/RDWOpenDataApiClient/{RdwApiClient.php => RDWOpenDataApiClient.php} (96%) rename src/RDW/RDWOpenDataApiClient/{RdwApiEndpoints.php => RDWOpenDataApiEndpoints.php} (95%) diff --git a/README.md b/README.md index 6ac8d57..0c86215 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Because this is Open Data provided by the government an API key is not needed. ## Usage: ``` -$rdwApiClient = new \DOvereem\RdwApiClient\RdwApiClient(); +$rdwApiClient = new \DOvereem\RDW\RDWOpenDataApiClient\RDWOpenDataApiClient; $vehicleData = $rdwApiClient->getLicensedVehicleDataByLicensePlateNumber("AA-BB-CC"); ``` diff --git a/src/RDW/RDWOpenDataApiClient/RdwApiClient.php b/src/RDW/RDWOpenDataApiClient/RDWOpenDataApiClient.php similarity index 96% rename from src/RDW/RDWOpenDataApiClient/RdwApiClient.php rename to src/RDW/RDWOpenDataApiClient/RDWOpenDataApiClient.php index e418624..6a2c145 100755 --- a/src/RDW/RDWOpenDataApiClient/RdwApiClient.php +++ b/src/RDW/RDWOpenDataApiClient/RDWOpenDataApiClient.php @@ -8,7 +8,7 @@ use GuzzleHttp\Psr7\Response; use JsonException; -class RdwApiClient +class RDWOpenDataApiClient { protected function createGuzzleClient(): Client { @@ -59,7 +59,7 @@ public function getLicensedVehicleDataByLicensePlateNumber(string $licensePlateN $licensePlateNumber = $this->normalizeLicensePlateNumber($licensePlateNumber); $response = $this->createGuzzleClient()->get( - RdwApiEndpoints::LICENCED_VEHICLES, + RDWOpenDataApiEndpoints::LICENCED_VEHICLES, [ 'query' => $this->createQuery('kenteken', $licensePlateNumber) ] diff --git a/src/RDW/RDWOpenDataApiClient/RdwApiEndpoints.php b/src/RDW/RDWOpenDataApiClient/RDWOpenDataApiEndpoints.php similarity index 95% rename from src/RDW/RDWOpenDataApiClient/RdwApiEndpoints.php rename to src/RDW/RDWOpenDataApiClient/RDWOpenDataApiEndpoints.php index 4bc669c..194db22 100755 --- a/src/RDW/RDWOpenDataApiClient/RdwApiEndpoints.php +++ b/src/RDW/RDWOpenDataApiClient/RDWOpenDataApiEndpoints.php @@ -2,7 +2,7 @@ namespace DOvereem\RDW\RDWOpenDataApiClient; -class RdwApiEndpoints +class RDWOpenDataApiEndpoints { const LICENCED_VEHICLES = "https://opendata.rdw.nl/resource/m9d7-ebf2.json"; const LICENCED_VEHICLES_AXLES = "https://opendata.rdw.nl/resource/3huj-srit.json";