File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 33namespace Seven \Api \Resource \Lookup ;
44
55class Carrier {
6- protected string $ country ;
6+ protected ? string $ country ;
77 protected ?string $ name ;
8- protected string $ networkCode ;
8+ protected ? string $ networkCode ;
99 protected ?string $ networkType ;
1010
1111 public function __construct (object $ data ) {
12- $ this ->country = $ data ->country ;
12+ $ this ->country = $ data ->country ?: null ;
1313 $ this ->name = $ data ->name ;
14- $ this ->networkCode = $ data ->network_code ;
14+ $ this ->networkCode = $ data ->network_code ?: null ;
1515 $ this ->networkType = $ data ->network_type ;
1616 }
1717
18- public function getCountry (): string {
18+ public function getCountry (): ? string {
1919 return $ this ->country ;
2020 }
2121
2222 public function getName (): ?string {
2323 return $ this ->name ;
2424 }
2525
26- public function getNetworkCode (): string {
26+ public function getNetworkCode (): ? string {
2727 return $ this ->networkCode ;
2828 }
2929
Original file line number Diff line number Diff line change 33namespace Seven \Api \Resource \Lookup ;
44
55class LookupHlr {
6- protected string $ countryCode ;
6+ protected ? string $ countryCode ;
77 protected ?string $ countryName ;
88 protected string |false $ countryPrefix ;
99 protected Carrier $ currentCarrier ;
@@ -23,7 +23,7 @@ class LookupHlr {
2323 protected string $ validNumber ;
2424
2525 public function __construct (object $ data ) {
26- $ this ->countryCode = $ data ->country_code ;
26+ $ this ->countryCode = $ data ->country_code ?: null ;
2727 $ this ->countryName = $ data ->country_name ;
2828 $ this ->countryPrefix = $ data ->country_prefix ;
2929 $ this ->currentCarrier = new Carrier ($ data ->current_carrier );
@@ -43,7 +43,7 @@ public function __construct(object $data) {
4343 $ this ->validNumber = $ data ->valid_number ;
4444 }
4545
46- public function getCountryCode (): string {
46+ public function getCountryCode (): ? string {
4747 return $ this ->countryCode ;
4848 }
4949
You can’t perform that action at this time.
0 commit comments