@@ -30,12 +30,12 @@ class HealthClient extends AbstractClient
3030 private const connectHealth = 'connect ' ;
3131 private const ingressHealth = 'ingress ' ;
3232
33- public function Node (string $ node , ? QueryOptions $ opts = null ): HealthChecksResponse
33+ public function Node (string $ node , null | QueryOptions $ opts = null ): HealthChecksResponse
3434 {
3535 return $ this ->_getHealthChecks (sprintf ('v1/health/node/%s ' , $ node ), $ opts );
3636 }
3737
38- public function Checks (string $ service , ? QueryOptions $ opts = null ): HealthChecksResponse
38+ public function Checks (string $ service , null | QueryOptions $ opts = null ): HealthChecksResponse
3939 {
4040 return $ this ->_getHealthChecks (sprintf ('v1/health/checks/%s ' , $ service ), $ opts );
4141 }
@@ -44,7 +44,7 @@ public function ServiceMultipleTags(
4444 string $ service ,
4545 array $ tags = [],
4646 bool $ passingOnly = false ,
47- ? QueryOptions $ opts = null
47+ null | QueryOptions $ opts = null
4848 ): ServiceEntriesResponse {
4949 return $ this ->_getServiceEntries ($ service , $ tags , $ passingOnly , $ opts , self ::serviceHealth);
5050 }
@@ -53,7 +53,7 @@ public function Service(
5353 string $ service ,
5454 string $ tag = '' ,
5555 bool $ passingOnly = false ,
56- ? QueryOptions $ opts = null
56+ null | QueryOptions $ opts = null
5757 ): ServiceEntriesResponse {
5858 return $ this ->ServiceMultipleTags ($ service , '' !== $ tag ? [$ tag ] : [], $ passingOnly , $ opts );
5959 }
@@ -62,7 +62,7 @@ public function IngressMultipleTags(
6262 string $ service ,
6363 array $ tags = [],
6464 bool $ passingOnly = false ,
65- ? QueryOptions $ opts = null
65+ null | QueryOptions $ opts = null
6666 ): ServiceEntriesResponse {
6767 return $ this ->_getServiceEntries ($ service , $ tags , $ passingOnly , $ opts , self ::ingressHealth);
6868 }
@@ -71,7 +71,7 @@ public function Ingress(
7171 string $ service ,
7272 string $ tag = '' ,
7373 bool $ passingOnly = false ,
74- ? QueryOptions $ opts = null
74+ null | QueryOptions $ opts = null
7575 ): ServiceEntriesResponse {
7676 return $ this ->IngressMultipleTags ($ service , '' !== $ tag ? [$ tag ] : [], $ passingOnly , $ opts );
7777 }
@@ -80,7 +80,7 @@ public function ConnectMultipleTags(
8080 string $ service ,
8181 array $ tags = [],
8282 bool $ passingOnly = false ,
83- ? QueryOptions $ opts = null
83+ null | QueryOptions $ opts = null
8484 ): ServiceEntriesResponse {
8585 return $ this ->_getServiceEntries ($ service , $ tags , $ passingOnly , $ opts , self ::connectHealth);
8686 }
@@ -89,12 +89,12 @@ public function Connect(
8989 string $ service ,
9090 string $ tag = '' ,
9191 bool $ passingOnly = false ,
92- ? QueryOptions $ opts = null
92+ null | QueryOptions $ opts = null
9393 ): ServiceEntriesResponse {
9494 return $ this ->ConnectMultipleTags ($ service , '' !== $ tag ? [$ tag ] : [], $ passingOnly , $ opts );
9595 }
9696
97- public function State (string $ state , ? QueryOptions $ opts = null ): HealthChecksResponse
97+ public function State (string $ state , null | QueryOptions $ opts = null ): HealthChecksResponse
9898 {
9999 static $ validStates = ['any ' , 'warning ' , 'critical ' , 'passing ' , 'unknown ' ];
100100
@@ -114,7 +114,7 @@ public function State(string $state, ?QueryOptions $opts = null): HealthChecksRe
114114 return $ this ->_getHealthChecks (sprintf ('v1/health/state/%s ' , $ state ), $ opts );
115115 }
116116
117- protected function _getHealthChecks (string $ path , ? QueryOptions $ opts ): HealthChecksResponse
117+ protected function _getHealthChecks (string $ path , null | QueryOptions $ opts ): HealthChecksResponse
118118 {
119119 $ resp = $ this ->_requireOK ($ this ->_doGet ($ path , $ opts ));
120120 $ ret = new HealthChecksResponse ();
@@ -126,7 +126,7 @@ private function _getServiceEntries(
126126 string $ service ,
127127 array $ tags ,
128128 bool $ passingOnly ,
129- ? QueryOptions $ opts ,
129+ null | QueryOptions $ opts ,
130130 string $ healthType
131131 ): ServiceEntriesResponse {
132132 $ uri = match ($ healthType ) {
0 commit comments