File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -49,10 +49,10 @@ protected function getClientMethods()
49
49
50
50
protected function getClientDefault (string $ key = null )
51
51
{
52
- if (empty ( $ key) ) {
52
+ if ($ key === null ) {
53
53
return empty ($ this ->getClient ()->default ) ? [] : $ this ->getClient ()->default ;
54
54
} else {
55
- return empty ( $ this ->getClientDefault ()[ $ key ] ) ? null : $ this ->getClientDefault ()[$ key ];
55
+ return array_key_exists ( $ key , $ this ->getClientDefault ()) ? $ this ->getClientDefault ()[$ key ] : null ;
56
56
}
57
57
}
58
58
@@ -61,7 +61,7 @@ protected function getClientFallback(string $key = null)
61
61
if ($ key === null ) {
62
62
return empty ($ this ->getClient ()->fallback ) ? [] : $ this ->getClient ()->fallback ;
63
63
} else {
64
- return empty ( $ this ->getClientFallback ()[ $ key ] ) ? null : $ this ->getClientFallback ()[$ key ];
64
+ return array_key_exists ( $ key , $ this ->getClientFallback ()) ? $ this ->getClientFallback ()[$ key ] : null ;
65
65
}
66
66
}
67
67
@@ -75,12 +75,12 @@ protected function setParams($params)
75
75
$ this ->params = array_merge ($ this ->getClientDefault (), $ params );
76
76
}
77
77
78
- protected function getParam ($ key = null )
78
+ protected function getParam (string $ key = null )
79
79
{
80
80
if ($ key === null ) {
81
81
return $ this ->params ;
82
82
} else {
83
- return empty ( $ this ->params [ $ key ] ) ? null : $ this ->params [$ key ];
83
+ return array_key_exists ( $ key , $ this ->params ) ? $ this ->params [$ key ] : null ;
84
84
}
85
85
}
86
86
You can’t perform that action at this time.
0 commit comments