diff --git a/os2web_datalookup.info.yml b/os2web_datalookup.info.yml index 5c5f684..c0abace 100644 --- a/os2web_datalookup.info.yml +++ b/os2web_datalookup.info.yml @@ -4,4 +4,4 @@ description: 'Provides integration with Danish data lookup services such as Serv package: 'OS2web' core_version_requirement: ^8 || ^9 || ^10 dependencies: - - 'os2web/os2web_audit' \ No newline at end of file + - 'os2web:os2web_audit' diff --git a/src/Plugin/os2web/DataLookup/DataLookupInterfaceCompany.php .php b/src/Plugin/os2web/DataLookup/DataLookupCompanyInterface.php similarity index 100% rename from src/Plugin/os2web/DataLookup/DataLookupInterfaceCompany.php .php rename to src/Plugin/os2web/DataLookup/DataLookupCompanyInterface.php diff --git a/src/Plugin/os2web/DataLookup/DatafordelerPNumber.php b/src/Plugin/os2web/DataLookup/DatafordelerPNumber.php index 32eed44..14ac1ba 100644 --- a/src/Plugin/os2web/DataLookup/DatafordelerPNumber.php +++ b/src/Plugin/os2web/DataLookup/DatafordelerPNumber.php @@ -66,7 +66,7 @@ public function submitConfigurationForm(array &$form, FormStateInterface $form_s */ public function lookup(string $param): CompanyLookupResult { try { - $msg = sprintf('Hent produktionsenhed med PNummer: ', $param); + $msg = sprintf('Hent produktionsenhed med PNummer: %s', $param); $this->auditLogger->info('DataLookup', $msg); $response = $this->httpClient->get('hentProduktionsenhedMedPNummer', ['query' => ['ppNummer' => $param]]); $result = json_decode((string) $response->getBody()); @@ -97,7 +97,7 @@ public function lookup(string $param): CompanyLookupResult { $city = implode(' ', array_filter([ $address->CVRAdresse_postdistrikt ?? NULL, $cvrResult->getPostalCode() ?? NULL, - ]); + ])); $cvrResult->setCity($city); $cvrResult->setMunicipalityCode($address->CVRAdresse_kommunekode ?? ''); $address = $cvrResult->getStreet() . ' ' . $cvrResult->getHouseNr() . ' ' . $cvrResult->getFloor() . $cvrResult->getApartmentNr(); diff --git a/src/Plugin/os2web/DataLookup/ServiceplatformenBase.php b/src/Plugin/os2web/DataLookup/ServiceplatformenBase.php index 80b7acc..ab95032 100644 --- a/src/Plugin/os2web/DataLookup/ServiceplatformenBase.php +++ b/src/Plugin/os2web/DataLookup/ServiceplatformenBase.php @@ -3,6 +3,7 @@ namespace Drupal\os2web_datalookup\Plugin\os2web\DataLookup; use Drupal\Core\Form\FormStateInterface; +use Drupal\os2web_audit\Service\Logger; /** * Defines base plugin class for Serviceplatformen plugins. @@ -26,8 +27,13 @@ abstract class ServiceplatformenBase extends DataLookupBase { /** * {@inheritdoc} */ - public function __construct(array $configuration, $plugin_id, $plugin_definition) { - parent::__construct($configuration, $plugin_id, $plugin_definition); + public function __construct( + array $configuration, + $plugin_id, + $plugin_definition, + Logger $auditLogger, + ) { + parent::__construct($configuration, $plugin_id, $plugin_definition, $auditLogger); $this->init(); }