File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -141,26 +141,20 @@ private static function makeCallable($result)
141141 {
142142 switch (true ) {
143143 case is_callable ($ result ):
144- $ callable = $ result ;
145-
146- break ;
144+ return $ result ;
147145 case $ result instanceof ResponseInterface:
148- $ callable = function () use ($ result ) {
146+ return function () use ($ result ) {
149147 return $ result ;
150148 };
151149
152150 break ;
153151 case $ result instanceof \Exception:
154- $ callable = function () use ($ result ) {
152+ return function () use ($ result ) {
155153 throw $ result ;
156154 };
157-
158- break ;
159155 default :
160156 throw new \InvalidArgumentException ('Result must be either a response, an exception, or a callable ' );
161157 }
162-
163- return $ callable ;
164158 }
165159
166160 /**
You can’t perform that action at this time.
0 commit comments