We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09bc1fc commit c71565fCopy full SHA for c71565f
src/Client.php
@@ -119,16 +119,19 @@ public function on(RequestMatcher $requestMatcher, $result)
119
switch (true) {
120
case is_callable($result):
121
$callable = $result;
122
+
123
break;
124
case $result instanceof ResponseInterface:
125
$callable = function () use ($result) {
126
return $result;
127
};
128
129
130
case $result instanceof \Exception:
131
132
throw $result;
133
134
135
136
default:
137
throw new \InvalidArgumentException('Result must be either a response, an exception, or a callable');
0 commit comments