@@ -808,7 +808,17 @@ public function createClient($handlerStack)
808
808
}
809
809
810
810
/**
811
- * add handlers to the handler stack.
811
+ * Build the Guzzle client handler stack.
812
+ *
813
+ * @return \GuzzleHttp\HandlerStack
814
+ */
815
+ public function buildHandlerStack ()
816
+ {
817
+ return $ this ->pushHandlers (HandlerStack::create ());
818
+ }
819
+
820
+ /**
821
+ * Add the necessary handlers to the given handler stack.
812
822
*
813
823
* @param \GuzzleHttp\HandlerStack $handlerStack
814
824
* @return \GuzzleHttp\HandlerStack
@@ -826,16 +836,6 @@ public function pushHandlers($handlerStack)
826
836
});
827
837
}
828
838
829
- /**
830
- * Build the before sending handler stack.
831
- *
832
- * @return \GuzzleHttp\HandlerStack
833
- */
834
- public function buildHandlerStack ()
835
- {
836
- return $ this ->pushHandlers (HandlerStack::create ());
837
- }
838
-
839
839
/**
840
840
* Build the before sending handler.
841
841
*
@@ -1046,14 +1046,16 @@ public function setClient(Client $client)
1046
1046
}
1047
1047
1048
1048
/**
1049
- * set the handler function .
1049
+ * Create a new client instance using the given handler .
1050
1050
*
1051
1051
* @param callable $handler
1052
1052
* @return $this
1053
1053
*/
1054
1054
public function setHandler ($ handler )
1055
1055
{
1056
- $ this ->client = $ this ->createClient ($ this ->pushHandlers (HandlerStack::create ($ handler )));
1056
+ $ this ->client = $ this ->createClient (
1057
+ $ this ->pushHandlers (HandlerStack::create ($ handler ))
1058
+ );
1057
1059
1058
1060
return $ this ;
1059
1061
}
0 commit comments