@@ -55,7 +55,7 @@ public function __construct(ContainerInterface $container, PackerInterface $pack
5555 $ this ->initBaseUri ($ server );
5656 }
5757
58- public function get ($ uri , $ data = [], $ headers = [])
58+ public function get (string $ uri , array $ data = [], array $ headers = [])
5959 {
6060 $ response = $ this ->request ('GET ' , $ uri , [
6161 'headers ' => $ headers ,
@@ -65,7 +65,7 @@ public function get($uri, $data = [], $headers = [])
6565 return $ this ->packer ->unpack ((string ) $ response ->getBody ());
6666 }
6767
68- public function post ($ uri , $ data = [], $ headers = [])
68+ public function post (string $ uri , array $ data = [], array $ headers = [])
6969 {
7070 $ response = $ this ->request ('POST ' , $ uri , [
7171 'headers ' => $ headers ,
@@ -75,7 +75,7 @@ public function post($uri, $data = [], $headers = [])
7575 return $ this ->packer ->unpack ((string ) $ response ->getBody ());
7676 }
7777
78- public function put ($ uri , $ data = [], $ headers = [])
78+ public function put (string $ uri , array $ data = [], array $ headers = [])
7979 {
8080 $ response = $ this ->request ('PUT ' , $ uri , [
8181 'headers ' => $ headers ,
@@ -85,7 +85,7 @@ public function put($uri, $data = [], $headers = [])
8585 return $ this ->packer ->unpack ((string ) $ response ->getBody ());
8686 }
8787
88- public function delete ($ uri , $ data = [], $ headers = [])
88+ public function delete (string $ uri , array $ data = [], array $ headers = [])
8989 {
9090 $ response = $ this ->request ('DELETE ' , $ uri , [
9191 'headers ' => $ headers ,
@@ -95,7 +95,7 @@ public function delete($uri, $data = [], $headers = [])
9595 return $ this ->packer ->unpack ((string ) $ response ->getBody ());
9696 }
9797
98- public function json ($ uri , $ data = [], $ headers = [])
98+ public function json (string $ uri , array $ data = [], array $ headers = [])
9999 {
100100 $ headers ['Content-Type ' ] = 'application/json ' ;
101101 $ response = $ this ->request ('POST ' , $ uri , [
@@ -105,7 +105,7 @@ public function json($uri, $data = [], $headers = [])
105105 return $ this ->packer ->unpack ((string ) $ response ->getBody ());
106106 }
107107
108- public function file ($ uri , $ data = [], $ headers = [])
108+ public function file (string $ uri , array $ data = [], array $ headers = [])
109109 {
110110 $ multipart = [];
111111 if (Arr::isAssoc ($ data )) {
@@ -174,7 +174,7 @@ protected function persistToContext(ServerRequestInterface $request, ResponseInt
174174 Context::set (ResponseInterface::class, $ response );
175175 }
176176
177- protected function initBaseUri ($ server ): void
177+ protected function initBaseUri (string $ server ): void
178178 {
179179 if ($ this ->container ->has (ConfigInterface::class)) {
180180 $ config = $ this ->container ->get (ConfigInterface::class);
0 commit comments