Skip to content

Commit f72c8b4

Browse files
authored
Merge pull request #136 from itk-dev/feature/apply-coding-standards
Apply coding standards
2 parents b958990 + 2c60a4b commit f72c8b4

File tree

25 files changed

+56
-35
lines changed

25 files changed

+56
-35
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ before starting to add changes. Use example [placed in the end of the page](#exa
1212
## [Unreleased]
1313

1414
- [OS-119] Keeping value of CPR clean, not adding address protection text
15+
- Applied coding standards
1516

16-
## [3.16.0] 2024-08-27
17+
## [3.16.0-beta1] 2024-08-27
1718

1819
[#110](https://github.com/OS2Forms/os2forms/pull/110)
1920

@@ -280,7 +281,8 @@ before starting to add changes. Use example [placed in the end of the page](#exa
280281
- Security in case of vulnerabilities.
281282
```
282283

283-
[Unreleased]: https://github.com/OS2Forms/os2forms/compare/3.15.8...HEAD
284+
[Unreleased]: https://github.com/OS2Forms/os2forms/compare/3.16.0-beta1...HEAD
285+
[3.16.0-beta1]: https://github.com/OS2Forms/os2forms/compare/3.15.8...3.16.0-beta1
284286
[3.15.8]: https://github.com/OS2Forms/os2forms/compare/3.15.7...3.15.8
285287
[3.15.7]: https://github.com/OS2Forms/os2forms/compare/3.15.6...3.15.7
286288
[3.15.6]: https://github.com/OS2Forms/os2forms/compare/3.15.5...3.15.6

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@
149149
"phpstan/extension-installer": true,
150150
"simplesamlphp/composer-module-installer": true,
151151
"vaimo/composer-patches": true,
152-
"zaporylie/composer-drupal-optimizations": true
152+
"zaporylie/composer-drupal-optimizations": true,
153+
"mglaman/composer-drupal-lenient": true
153154
}
154155
}
155156
}

modules/os2forms_autocomplete/src/Plugin/WebformElement/AutocompleteElement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ protected function defineDefaultProperties() {
3838
/**
3939
* {@inheritdoc}
4040
*/
41-
public function prepare(array &$element, WebformSubmissionInterface $webform_submission = NULL) {
41+
public function prepare(array &$element, ?WebformSubmissionInterface $webform_submission = NULL) {
4242
parent::prepare($element, $webform_submission);
4343

4444
if (isset($element['#webform_key'])) {

modules/os2forms_dawa/src/Plugin/WebformElement/DawaElementAddress.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function getDefaultProperties() {
3131
/**
3232
* {@inheritdoc}
3333
*/
34-
public function prepare(array &$element, WebformSubmissionInterface $webform_submission = NULL) {
34+
public function prepare(array &$element, ?WebformSubmissionInterface $webform_submission = NULL) {
3535
parent::prepare($element, $webform_submission);
3636

3737
$element['#autocomplete_route_parameters']['remove_place_name'] = $element['#remove_place_name'] ?? FALSE;

modules/os2forms_dawa/src/Plugin/WebformElement/DawaElementAddressMatrikula.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function getDefaultProperties() {
3636
/**
3737
* {@inheritdoc}
3838
*/
39-
public function prepare(array &$element, WebformSubmissionInterface $webform_submission = NULL) {
39+
public function prepare(array &$element, ?WebformSubmissionInterface $webform_submission = NULL) {
4040
parent::prepare($element, $webform_submission);
4141

4242
$element['#webform_composite_elements']['address']['#remove_place_name'] = TRUE;

modules/os2forms_dawa/src/Plugin/WebformElement/DawaElementBase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function getDefaultProperties() {
2525
/**
2626
* {@inheritdoc}
2727
*/
28-
public function prepare(array &$element, WebformSubmissionInterface $webform_submission = NULL) {
28+
public function prepare(array &$element, ?WebformSubmissionInterface $webform_submission = NULL) {
2929
parent::prepare($element, $webform_submission);
3030

3131
$element['#autocomplete_route_name'] = 'os2forms_dawa.element.autocomplete';

modules/os2forms_dawa/src/Plugin/WebformElement/DawaElementBlock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function getDefaultProperties() {
3030
/**
3131
* {@inheritdoc}
3232
*/
33-
public function prepare(array &$element, WebformSubmissionInterface $webform_submission = NULL) {
33+
public function prepare(array &$element, ?WebformSubmissionInterface $webform_submission = NULL) {
3434
parent::prepare($element, $webform_submission);
3535

3636
$element['#autocomplete_route_parameters']['remove_code'] = $element['#remove_code'] ?? FALSE;

modules/os2forms_dawa/src/Plugin/WebformElement/DawaElementMatrikula.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function getDefaultProperties() {
3131
/**
3232
* {@inheritdoc}
3333
*/
34-
public function prepare(array &$element, WebformSubmissionInterface $webform_submission = NULL) {
34+
public function prepare(array &$element, ?WebformSubmissionInterface $webform_submission = NULL) {
3535
parent::prepare($element, $webform_submission);
3636

3737
$element['#autocomplete_route_parameters']['remove_code'] = $element['#remove_code'] ?? FALSE;

modules/os2forms_digital_post/src/Helper/DigitalPostHelper.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
use Drupal\os2web_datalookup\Plugin\os2web\DataLookup\DataLookupInterfaceCompany;
1212
use Drupal\os2web_datalookup\Plugin\os2web\DataLookup\DataLookupInterfaceCpr;
1313
use Drupal\webform\WebformSubmissionInterface;
14-
use ItkDev\Serviceplatformen\Service\SF1601\Serializer;
1514
use ItkDev\Serviceplatformen\Service\SF1601\SF1601;
15+
use ItkDev\Serviceplatformen\Service\SF1601\Serializer;
1616
use Oio\Fjernprint\ForsendelseI;
1717
use Psr\Log\LoggerInterface;
1818
use Psr\Log\LoggerTrait;
@@ -55,7 +55,7 @@ public function __construct(
5555
*
5656
* @phpstan-return array<int, mixed>
5757
*/
58-
public function sendDigitalPost(string $type, Message $message, ?ForsendelseI $forsendelse, WebformSubmissionInterface $submission = NULL): array {
58+
public function sendDigitalPost(string $type, Message $message, ?ForsendelseI $forsendelse, ?WebformSubmissionInterface $submission = NULL): array {
5959
$senderSettings = $this->settings->getSender();
6060
$options = [
6161
'test_mode' => (bool) $this->settings->getTestMode(),
@@ -76,6 +76,15 @@ public function sendDigitalPost(string $type, Message $message, ?ForsendelseI $f
7676

7777
/**
7878
* {@inheritdoc}
79+
*
80+
* @param mixed $level
81+
* The level.
82+
* @param string $message
83+
* The message.
84+
* @param array $context
85+
* The context.
86+
*
87+
* @phpstan-param array<string, mixed> $context
7988
*/
8089
public function log($level, $message, array $context = []): void {
8190
$this->logger->log($level, $message, $context);

modules/os2forms_digital_post/src/Helper/MeMoHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
use Drupal\os2web_datalookup\LookupResult\CompanyLookupResult;
2020
use Drupal\os2web_datalookup\LookupResult\CprLookupResult;
2121
use Drupal\webform\WebformSubmissionInterface;
22-
use ItkDev\Serviceplatformen\Service\SF1601\Serializer;
2322
use ItkDev\Serviceplatformen\Service\SF1601\SF1601;
23+
use ItkDev\Serviceplatformen\Service\SF1601\Serializer;
2424

2525
/**
2626
* MeMo helper.

0 commit comments

Comments
 (0)