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 3
3
namespace Seven \Api \Resource \Lookup ;
4
4
5
5
class Carrier {
6
- protected string $ country ;
6
+ protected ? string $ country ;
7
7
protected ?string $ name ;
8
- protected string $ networkCode ;
8
+ protected ? string $ networkCode ;
9
9
protected ?string $ networkType ;
10
10
11
11
public function __construct (object $ data ) {
12
- $ this ->country = $ data ->country ;
12
+ $ this ->country = $ data ->country ?: null ;
13
13
$ this ->name = $ data ->name ;
14
- $ this ->networkCode = $ data ->network_code ;
14
+ $ this ->networkCode = $ data ->network_code ?: null ;
15
15
$ this ->networkType = $ data ->network_type ;
16
16
}
17
17
18
- public function getCountry (): string {
18
+ public function getCountry (): ? string {
19
19
return $ this ->country ;
20
20
}
21
21
22
22
public function getName (): ?string {
23
23
return $ this ->name ;
24
24
}
25
25
26
- public function getNetworkCode (): string {
26
+ public function getNetworkCode (): ? string {
27
27
return $ this ->networkCode ;
28
28
}
29
29
Original file line number Diff line number Diff line change 3
3
namespace Seven \Api \Resource \Lookup ;
4
4
5
5
class LookupHlr {
6
- protected string $ countryCode ;
6
+ protected ? string $ countryCode ;
7
7
protected ?string $ countryName ;
8
8
protected string |false $ countryPrefix ;
9
9
protected Carrier $ currentCarrier ;
@@ -23,7 +23,7 @@ class LookupHlr {
23
23
protected string $ validNumber ;
24
24
25
25
public function __construct (object $ data ) {
26
- $ this ->countryCode = $ data ->country_code ;
26
+ $ this ->countryCode = $ data ->country_code ?: null ;
27
27
$ this ->countryName = $ data ->country_name ;
28
28
$ this ->countryPrefix = $ data ->country_prefix ;
29
29
$ this ->currentCarrier = new Carrier ($ data ->current_carrier );
@@ -43,7 +43,7 @@ public function __construct(object $data) {
43
43
$ this ->validNumber = $ data ->valid_number ;
44
44
}
45
45
46
- public function getCountryCode (): string {
46
+ public function getCountryCode (): ? string {
47
47
return $ this ->countryCode ;
48
48
}
49
49
You can’t perform that action at this time.
0 commit comments