Skip to content

Commit d5ae5c8

Browse files
committed
Typehint DistributionKey id to integer instead of string
1 parent 2fe327e commit d5ae5c8

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

CultureFeed/CultureFeed/Uitpas/DistributionKey.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class CultureFeed_Uitpas_DistributionKey {
44

5-
public string $id;
5+
public int $id;
66

77
public string $name;
88

CultureFeed/test/uitpas/CultureFeed_Uitpas_EventUpdateTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ public function testUpdateEvent(): void {
2020
$event->locationId = 'abd76139-5b0d-42b1-ba5b-a40172e27fba';
2121

2222
$distributionKey200 = new CultureFeed_Uitpas_DistributionKey();
23-
$distributionKey200->id = '200';
23+
$distributionKey200->id = 200;
2424
$distributionKey200->name = 'Distribution key 200';
2525

2626
$distributionKey201 = new CultureFeed_Uitpas_DistributionKey();
27-
$distributionKey201->id = '201';
27+
$distributionKey201->id = 201;
2828
$distributionKey201->name = 'Distribution key 201';
2929

3030
$response = <<<XML

CultureFeed/test/uitpas/Event/CultureEventTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ public function testCreateFromXml(): void {
1717
$this->assertSame('5c9c73d3-e82f-e7b3-44161e6e3802e64f', $event->organiserId);
1818

1919
$distributionKey200 = new CultureFeed_Uitpas_DistributionKey();
20-
$distributionKey200->id = '200';
20+
$distributionKey200->id = 200;
2121
$distributionKey200->name = 'Distribution key 200';
2222

2323
$distributionKey201 = new CultureFeed_Uitpas_DistributionKey();
24-
$distributionKey201->id = '201';
24+
$distributionKey201->id = 201;
2525
$distributionKey201->name = 'Distribution key 201';
2626

2727
$this->assertIsArray($event->distributionKey);
@@ -70,11 +70,11 @@ public function testToPostDataWithDistributionKeysAsArrayOfObjects(): void {
7070
$event = new CultureFeed_Uitpas_Event_CultureEvent();
7171

7272
$distributionKey200 = new CultureFeed_Uitpas_DistributionKey();
73-
$distributionKey200->id = '200';
73+
$distributionKey200->id = 200;
7474
$distributionKey200->name = 'Distribution key 200';
7575

7676
$distributionKey201 = new CultureFeed_Uitpas_DistributionKey();
77-
$distributionKey201->id = '201';
77+
$distributionKey201->id = 201;
7878
$distributionKey201->name = 'Distribution key 201';
7979

8080
$event->distributionKey = array(

0 commit comments

Comments
 (0)