Skip to content

Commit eb4d55b

Browse files
authored
Merge pull request #1 from itk-dev/feature/os2form-audit-update
ITKDev: Minor fixes
2 parents 876c756 + 827099d commit eb4d55b

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

os2web_datalookup.info.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ description: 'Provides integration with Danish data lookup services such as Serv
44
package: 'OS2web'
55
core_version_requirement: ^8 || ^9 || ^10
66
dependencies:
7-
- 'os2web/os2web_audit'
7+
- 'os2web:os2web_audit'

src/Plugin/os2web/DataLookup/DatafordelerPNumber.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function submitConfigurationForm(array &$form, FormStateInterface $form_s
6666
*/
6767
public function lookup(string $param): CompanyLookupResult {
6868
try {
69-
$msg = sprintf('Hent produktionsenhed med PNummer: ', $param);
69+
$msg = sprintf('Hent produktionsenhed med PNummer: %s', $param);
7070
$this->auditLogger->info('DataLookup', $msg);
7171
$response = $this->httpClient->get('hentProduktionsenhedMedPNummer', ['query' => ['ppNummer' => $param]]);
7272
$result = json_decode((string) $response->getBody());
@@ -97,7 +97,7 @@ public function lookup(string $param): CompanyLookupResult {
9797
$city = implode(' ', array_filter([
9898
$address->CVRAdresse_postdistrikt ?? NULL,
9999
$cvrResult->getPostalCode() ?? NULL,
100-
]);
100+
]));
101101
$cvrResult->setCity($city);
102102
$cvrResult->setMunicipalityCode($address->CVRAdresse_kommunekode ?? '');
103103
$address = $cvrResult->getStreet() . ' ' . $cvrResult->getHouseNr() . ' ' . $cvrResult->getFloor() . $cvrResult->getApartmentNr();

src/Plugin/os2web/DataLookup/ServiceplatformenBase.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Drupal\os2web_datalookup\Plugin\os2web\DataLookup;
44

55
use Drupal\Core\Form\FormStateInterface;
6+
use Drupal\os2web_audit\Service\Logger;
67

78
/**
89
* Defines base plugin class for Serviceplatformen plugins.
@@ -26,8 +27,13 @@ abstract class ServiceplatformenBase extends DataLookupBase {
2627
/**
2728
* {@inheritdoc}
2829
*/
29-
public function __construct(array $configuration, $plugin_id, $plugin_definition) {
30-
parent::__construct($configuration, $plugin_id, $plugin_definition);
30+
public function __construct(
31+
array $configuration,
32+
$plugin_id,
33+
$plugin_definition,
34+
Logger $auditLogger,
35+
) {
36+
parent::__construct($configuration, $plugin_id, $plugin_definition, $auditLogger);
3137
$this->init();
3238
}
3339

0 commit comments

Comments
 (0)