Skip to content

Commit ee2eec3

Browse files
authored
Country code prefix fix for Number Insight (#302)
* Cast the country code prefix string to an integer in line with the expected return type * do not cast to integer, reflect what comes back from API as leading zeroes might come back
1 parent c180d27 commit ee2eec3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Insights/Basic.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function getCountryName(): string
6262
return $this->data['country_name'];
6363
}
6464

65-
public function getCountryPrefix(): int
65+
public function getCountryPrefix(): string
6666
{
6767
return $this->data['country_prefix'];
6868
}

test/Insights/BasicTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function basicTestProvider(): array
6363
'country_code' => 'GB',
6464
'country_code_iso3' => 'GBR',
6565
'country_name' => 'United Kingdom',
66-
'country_prefix' => 44,
66+
'country_prefix' => '44',
6767
];
6868

6969
$basic1 = new Basic($inputBasic1['national_format_number']);

0 commit comments

Comments
 (0)