Skip to content

Commit f337733

Browse files
committed
Add missing iterable type specifications
1 parent 2da0f7f commit f337733

File tree

5 files changed

+24
-0
lines changed

5 files changed

+24
-0
lines changed

modules/os2forms_fbs_handler/src/Client/FBS.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ public function createGuardian(Patron $patron, Guardian $guardian): int {
243243
*
244244
* @throws \GuzzleHttp\Exception\GuzzleException
245245
* @throws \JsonException
246+
*
247+
* @phpstan-param array<mixed>|string $data
246248
*/
247249
private function request(string $uri, array|string $data, string $method = Request::METHOD_POST): mixed {
248250
$url = rtrim($this->endpoint, '/\\');

modules/os2forms_fbs_handler/src/Client/Model/Guardian.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ public function __construct(
2222
*
2323
* @return array
2424
* Array with field required by FBS calls.
25+
*
26+
* @phpstan-return array<string, string>
2527
*/
2628
public function toArray(): array {
2729
return [

modules/os2forms_fbs_handler/src/Client/Model/Patron.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ final class Patron {
99

1010
/**
1111
* Default constructor.
12+
*
13+
* @phpstan-param array<mixed>|null $notificationProtocols
14+
* @phpstan-param array<mixed>|null $onHold
15+
* @phpstan-param array<mixed>|null $emailAddresses
1216
*/
1317
public function __construct(
1418
public readonly ?string $patronId = NULL,
@@ -35,6 +39,8 @@ public function __construct(
3539
*
3640
* @return array
3741
* Array with field required by FBS calls.
42+
*
43+
* @phpstan-return array<string, string>
3844
*/
3945
public function toArray(): array {
4046
return [

modules/os2forms_fbs_handler/src/Plugin/AdvancedQueue/JobType/FbsCreateUser.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ final class FbsCreateUser extends JobTypeBase implements ContainerFactoryPluginI
3535

3636
/**
3737
* {@inheritdoc}
38+
*
39+
* @phpstan-param array<mixed> $configuration
3840
*/
3941
public function __construct(
4042
array $configuration,
@@ -50,6 +52,8 @@ public function __construct(
5052

5153
/**
5254
* {@inheritdoc}
55+
*
56+
* @phpstan-param array<mixed> $configuration
5357
*/
5458
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
5559
return new static(

modules/os2forms_fbs_handler/src/Plugin/WebformHandler/FbsWebformHandler.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ final class FbsWebformHandler extends WebformHandlerBase {
4545

4646
/**
4747
* Constructs an FbsWebformHandler object.
48+
*
49+
* @phpstan-param array<mixed> $configuration
4850
*/
4951
public function __construct(
5052
array $configuration,
@@ -70,6 +72,8 @@ public function __construct(
7072

7173
/**
7274
* {@inheritdoc}
75+
*
76+
* @phpstan-param array<mixed> $configuration
7377
*/
7478
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
7579
return new static(
@@ -87,6 +91,10 @@ public static function create(ContainerInterface $container, array $configuratio
8791

8892
/**
8993
* {@inheritdoc}
94+
*
95+
* @phpstan-param array<mixed> $form
96+
*
97+
* @phpstan-return array<mixed>
9098
*/
9199
public function buildConfigurationForm(array $form, FormStateInterface $form_state): array {
92100
if (is_null($this->getQueue())) {
@@ -143,6 +151,8 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta
143151

144152
/**
145153
* {@inheritdoc}
154+
*
155+
* @phpstan-param array<mixed> $form
146156
*/
147157
public function submitConfigurationForm(array &$form, FormStateInterface $form_state): void {
148158
parent::submitConfigurationForm($form, $form_state);

0 commit comments

Comments
 (0)