@@ -28,7 +28,7 @@ |
||
| 28 | 28 | * @param non-empty-string|int $code |
| 29 | 29 | * @param non-empty-string|null $description |
| 30 | 30 | */ |
| 31 | - public function setStatus(string|int $code, string $description = null): self; |
|
| 31 | + public function setStatus(string | int $code, string $description = null): self; |
|
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * Get the current span status. |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | { |
| 46 | 46 | $core = $this->getCore(); |
| 47 | 47 | |
| 48 | - $core->setHandler(function () { |
|
| 48 | + $core->setHandler(function (){ |
|
| 49 | 49 | return 'hello world'; |
| 50 | 50 | }); |
| 51 | 51 | |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | { |
| 68 | 68 | $core = $this->getCore(); |
| 69 | 69 | $core->setHandler( |
| 70 | - new CallableHandler(function () { |
|
| 70 | + new CallableHandler(function (){ |
|
| 71 | 71 | return 'hello world'; |
| 72 | 72 | }, new ResponseFactory(new HttpConfig(['headers' => []]))) |
| 73 | 73 | ); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | { |
| 81 | 81 | $core = $this->getCore(); |
| 82 | 82 | |
| 83 | - $core->setHandler(function ($req, $resp) { |
|
| 83 | + $core->setHandler(function ($req, $resp){ |
|
| 84 | 84 | return $resp->withAddedHeader('hello', 'value'); |
| 85 | 85 | }); |
| 86 | 86 | |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | { |
| 94 | 94 | $core = $this->getCore(); |
| 95 | 95 | |
| 96 | - $core->setHandler(function ($req, $resp) { |
|
| 96 | + $core->setHandler(function ($req, $resp){ |
|
| 97 | 97 | echo 'hello!'; |
| 98 | 98 | |
| 99 | 99 | return $resp->withAddedHeader('hello', 'value'); |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | { |
| 110 | 110 | $core = $this->getCore(); |
| 111 | 111 | |
| 112 | - $core->setHandler(function ($req, $resp) { |
|
| 112 | + $core->setHandler(function ($req, $resp){ |
|
| 113 | 113 | echo 'hello!'; |
| 114 | 114 | $resp->getBody()->write('world '); |
| 115 | 115 | |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | { |
| 127 | 127 | $core = $this->getCore(); |
| 128 | 128 | |
| 129 | - $core->setHandler(function () { |
|
| 129 | + $core->setHandler(function (){ |
|
| 130 | 130 | ob_start(); |
| 131 | 131 | ob_start(); |
| 132 | 132 | echo 'hello!'; |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | { |
| 148 | 148 | $core = $this->getCore(); |
| 149 | 149 | |
| 150 | - $core->setHandler(function () { |
|
| 150 | + $core->setHandler(function (){ |
|
| 151 | 151 | return [ |
| 152 | 152 | 'status' => 404, |
| 153 | 153 | 'message' => 'not found', |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | { |
| 164 | 164 | $core = $this->getCore(); |
| 165 | 165 | |
| 166 | - $core->setHandler(function () { |
|
| 166 | + $core->setHandler(function (){ |
|
| 167 | 167 | return new Json([ |
| 168 | 168 | 'status' => 404, |
| 169 | 169 | 'message' => 'not found', |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | { |
| 180 | 180 | $core = $this->getCore([HeaderMiddleware::class]); |
| 181 | 181 | |
| 182 | - $core->setHandler(function () { |
|
| 182 | + $core->setHandler(function (){ |
|
| 183 | 183 | return 'hello?'; |
| 184 | 184 | }); |
| 185 | 185 | |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | $core->getPipeline()->pushMiddleware(new Header2Middleware()); |
| 197 | 197 | $core->getPipeline()->riseMiddleware(new HeaderMiddleware()); |
| 198 | 198 | |
| 199 | - $core->setHandler(function () { |
|
| 199 | + $core->setHandler(function (){ |
|
| 200 | 200 | return 'hello?'; |
| 201 | 201 | }); |
| 202 | 202 | |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | $core->getPipeline()->pushMiddleware(new HeaderMiddleware()); |
| 214 | 214 | $core->getPipeline()->riseMiddleware(new Header2Middleware()); |
| 215 | 215 | |
| 216 | - $core->setHandler(function () { |
|
| 216 | + $core->setHandler(function (){ |
|
| 217 | 217 | return 'hello?'; |
| 218 | 218 | }); |
| 219 | 219 | |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | { |
| 228 | 228 | $core = $this->getCore(); |
| 229 | 229 | |
| 230 | - $core->setHandler(function () { |
|
| 230 | + $core->setHandler(function (){ |
|
| 231 | 231 | $this->assertTrue($this->container->has(ServerRequestInterface::class)); |
| 232 | 232 | |
| 233 | 233 | return 'OK'; |
@@ -260,12 +260,12 @@ discard block |
||
| 260 | 260 | $dispatcher |
| 261 | 261 | ->expects(self::exactly(2)) |
| 262 | 262 | ->method('dispatch') |
| 263 | - ->with($this->callback(static fn(RequestReceived|RequestHandled $event): bool => true)); |
|
| 263 | + ->with($this->callback(static fn(RequestReceived | RequestHandled $event): bool => true)); |
|
| 264 | 264 | $this->container->bind(EventDispatcherInterface::class, $dispatcher); |
| 265 | 265 | |
| 266 | 266 | $core = $this->getCore(); |
| 267 | 267 | |
| 268 | - $core->setHandler(function () { |
|
| 268 | + $core->setHandler(function (){ |
|
| 269 | 269 | return 'hello world'; |
| 270 | 270 | }); |
| 271 | 271 | |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | $tracerFactory = m::mock(TracerFactoryInterface::class), |
| 288 | 288 | ); |
| 289 | 289 | |
| 290 | - $http->setHandler(function () { |
|
| 290 | + $http->setHandler(function (){ |
|
| 291 | 291 | return 'hello world'; |
| 292 | 292 | }); |
| 293 | 293 | |
@@ -45,7 +45,8 @@ discard block |
||
| 45 | 45 | { |
| 46 | 46 | $core = $this->getCore(); |
| 47 | 47 | |
| 48 | - $core->setHandler(function () { |
|
| 48 | + $core->setHandler(function () |
|
| 49 | + { |
|
| 49 | 50 | return 'hello world'; |
| 50 | 51 | }); |
| 51 | 52 | |
@@ -67,7 +68,8 @@ discard block |
||
| 67 | 68 | { |
| 68 | 69 | $core = $this->getCore(); |
| 69 | 70 | $core->setHandler( |
| 70 | - new CallableHandler(function () { |
|
| 71 | + new CallableHandler(function () |
|
| 72 | + { |
|
| 71 | 73 | return 'hello world'; |
| 72 | 74 | }, new ResponseFactory(new HttpConfig(['headers' => []]))) |
| 73 | 75 | ); |
@@ -80,7 +82,8 @@ discard block |
||
| 80 | 82 | { |
| 81 | 83 | $core = $this->getCore(); |
| 82 | 84 | |
| 83 | - $core->setHandler(function ($req, $resp) { |
|
| 85 | + $core->setHandler(function ($req, $resp) |
|
| 86 | + { |
|
| 84 | 87 | return $resp->withAddedHeader('hello', 'value'); |
| 85 | 88 | }); |
| 86 | 89 | |
@@ -93,7 +96,8 @@ discard block |
||
| 93 | 96 | { |
| 94 | 97 | $core = $this->getCore(); |
| 95 | 98 | |
| 96 | - $core->setHandler(function ($req, $resp) { |
|
| 99 | + $core->setHandler(function ($req, $resp) |
|
| 100 | + { |
|
| 97 | 101 | echo 'hello!'; |
| 98 | 102 | |
| 99 | 103 | return $resp->withAddedHeader('hello', 'value'); |
@@ -109,7 +113,8 @@ discard block |
||
| 109 | 113 | { |
| 110 | 114 | $core = $this->getCore(); |
| 111 | 115 | |
| 112 | - $core->setHandler(function ($req, $resp) { |
|
| 116 | + $core->setHandler(function ($req, $resp) |
|
| 117 | + { |
|
| 113 | 118 | echo 'hello!'; |
| 114 | 119 | $resp->getBody()->write('world '); |
| 115 | 120 | |
@@ -126,7 +131,8 @@ discard block |
||
| 126 | 131 | { |
| 127 | 132 | $core = $this->getCore(); |
| 128 | 133 | |
| 129 | - $core->setHandler(function () { |
|
| 134 | + $core->setHandler(function () |
|
| 135 | + { |
|
| 130 | 136 | ob_start(); |
| 131 | 137 | ob_start(); |
| 132 | 138 | echo 'hello!'; |
@@ -147,7 +153,8 @@ discard block |
||
| 147 | 153 | { |
| 148 | 154 | $core = $this->getCore(); |
| 149 | 155 | |
| 150 | - $core->setHandler(function () { |
|
| 156 | + $core->setHandler(function () |
|
| 157 | + { |
|
| 151 | 158 | return [ |
| 152 | 159 | 'status' => 404, |
| 153 | 160 | 'message' => 'not found', |
@@ -163,7 +170,8 @@ discard block |
||
| 163 | 170 | { |
| 164 | 171 | $core = $this->getCore(); |
| 165 | 172 | |
| 166 | - $core->setHandler(function () { |
|
| 173 | + $core->setHandler(function () |
|
| 174 | + { |
|
| 167 | 175 | return new Json([ |
| 168 | 176 | 'status' => 404, |
| 169 | 177 | 'message' => 'not found', |
@@ -179,7 +187,8 @@ discard block |
||
| 179 | 187 | { |
| 180 | 188 | $core = $this->getCore([HeaderMiddleware::class]); |
| 181 | 189 | |
| 182 | - $core->setHandler(function () { |
|
| 190 | + $core->setHandler(function () |
|
| 191 | + { |
|
| 183 | 192 | return 'hello?'; |
| 184 | 193 | }); |
| 185 | 194 | |
@@ -196,7 +205,8 @@ discard block |
||
| 196 | 205 | $core->getPipeline()->pushMiddleware(new Header2Middleware()); |
| 197 | 206 | $core->getPipeline()->riseMiddleware(new HeaderMiddleware()); |
| 198 | 207 | |
| 199 | - $core->setHandler(function () { |
|
| 208 | + $core->setHandler(function () |
|
| 209 | + { |
|
| 200 | 210 | return 'hello?'; |
| 201 | 211 | }); |
| 202 | 212 | |
@@ -213,7 +223,8 @@ discard block |
||
| 213 | 223 | $core->getPipeline()->pushMiddleware(new HeaderMiddleware()); |
| 214 | 224 | $core->getPipeline()->riseMiddleware(new Header2Middleware()); |
| 215 | 225 | |
| 216 | - $core->setHandler(function () { |
|
| 226 | + $core->setHandler(function () |
|
| 227 | + { |
|
| 217 | 228 | return 'hello?'; |
| 218 | 229 | }); |
| 219 | 230 | |
@@ -227,7 +238,8 @@ discard block |
||
| 227 | 238 | { |
| 228 | 239 | $core = $this->getCore(); |
| 229 | 240 | |
| 230 | - $core->setHandler(function () { |
|
| 241 | + $core->setHandler(function () |
|
| 242 | + { |
|
| 231 | 243 | $this->assertTrue($this->container->has(ServerRequestInterface::class)); |
| 232 | 244 | |
| 233 | 245 | return 'OK'; |
@@ -265,7 +277,8 @@ discard block |
||
| 265 | 277 | |
| 266 | 278 | $core = $this->getCore(); |
| 267 | 279 | |
| 268 | - $core->setHandler(function () { |
|
| 280 | + $core->setHandler(function () |
|
| 281 | + { |
|
| 269 | 282 | return 'hello world'; |
| 270 | 283 | }); |
| 271 | 284 | |
@@ -287,7 +300,8 @@ discard block |
||
| 287 | 300 | $tracerFactory = m::mock(TracerFactoryInterface::class), |
| 288 | 301 | ); |
| 289 | 302 | |
| 290 | - $http->setHandler(function () { |
|
| 303 | + $http->setHandler(function () |
|
| 304 | + { |
|
| 291 | 305 | return 'hello world'; |
| 292 | 306 | }); |
| 293 | 307 | |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | private readonly ScopeInterface $scope, |
| 33 | 33 | private readonly ?EventDispatcherInterface $dispatcher = null, |
| 34 | 34 | ?TracerInterface $tracer = null |
| 35 | - ) { |
|
| 35 | + ){ |
|
| 36 | 36 | $this->tracer = $tracer ?? new NullTracer($scope); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -57,12 +57,12 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | public function handle(Request $request): Response |
| 59 | 59 | { |
| 60 | - if ($this->handler === null) { |
|
| 60 | + if ($this->handler === null){ |
|
| 61 | 61 | throw new PipelineException('Unable to run pipeline, no handler given.'); |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | $position = $this->position++; |
| 65 | - if (isset($this->middleware[$position])) { |
|
| 65 | + if (isset($this->middleware[$position])){ |
|
| 66 | 66 | $middleware = $this->middleware[$position]; |
| 67 | 67 | $this->dispatcher?->dispatch(new MiddlewareProcessing($request, $middleware)); |
| 68 | 68 | |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | { |
| 18 | 18 | public function __construct( |
| 19 | 19 | private readonly ?ScopeInterface $scope = new Container(), |
| 20 | - ) { |
|
| 20 | + ){ |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -28,6 +28,6 @@ discard block |
||
| 28 | 28 | return $this->scope->runScope([ |
| 29 | 29 | SpanInterface::class => $span, |
| 30 | 30 | TracerInterface::class => $this, |
| 31 | - ], static fn (InvokerInterface $invoker): mixed => $invoker->invoke($callback)); |
|
| 31 | + ], static fn (InvokerInterface $invoker) : mixed => $invoker->invoke($callback)); |
|
| 32 | 32 | } |
| 33 | 33 | } |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | private readonly ClockInterface $clock, |
| 24 | 24 | private readonly LoggerInterface $logger, |
| 25 | 25 | private readonly UuidFactoryInterface $uuidFactory |
| 26 | - ) { |
|
| 26 | + ){ |
|
| 27 | 27 | parent::__construct($scope); |
| 28 | 28 | } |
| 29 | 29 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | $tracerFactory->shouldReceive('make') |
| 23 | 23 | ->once() |
| 24 | 24 | ->with(['some' => 'data']) |
| 25 | - ->andReturn( $tracer = new NullTracer()); |
|
| 25 | + ->andReturn($tracer = new NullTracer()); |
|
| 26 | 26 | |
| 27 | 27 | $handler = new Handler( |
| 28 | 28 | core: $core = m::mock(CoreInterface::class), |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | public function __construct( |
| 19 | 19 | private readonly CoreInterface $core, |
| 20 | 20 | ?TracerFactoryInterface $tracerFactory = null |
| 21 | - ) { |
|
| 21 | + ){ |
|
| 22 | 22 | $this->tracerFactory = $tracerFactory ?? new NullTracerFactory(new Container()); |
| 23 | 23 | } |
| 24 | 24 | |
@@ -32,8 +32,8 @@ discard block |
||
| 32 | 32 | private readonly ResponseFactoryInterface $responseFactory, |
| 33 | 33 | private readonly ContainerInterface $container, |
| 34 | 34 | ?TracerFactoryInterface $tracerFactory = null |
| 35 | - ) { |
|
| 36 | - foreach ($this->config->getMiddleware() as $middleware) { |
|
| 35 | + ){ |
|
| 36 | + foreach ($this->config->getMiddleware() as $middleware){ |
|
| 37 | 37 | $this->pipeline->pushMiddleware($this->container->get($middleware)); |
| 38 | 38 | } |
| 39 | 39 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | return $this->pipeline; |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - public function setHandler(callable|RequestHandlerInterface $handler): self |
|
| 49 | + public function setHandler(callable | RequestHandlerInterface $handler): self |
|
| 50 | 50 | { |
| 51 | 51 | $this->handler = $handler instanceof RequestHandlerInterface |
| 52 | 52 | ? $handler |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | |
| 68 | 68 | $dispatcher?->dispatch(new RequestReceived($request)); |
| 69 | 69 | |
| 70 | - if ($this->handler === null) { |
|
| 70 | + if ($this->handler === null){ |
|
| 71 | 71 | throw new HttpException('Unable to run HttpCore, no handler is set.'); |
| 72 | 72 | } |
| 73 | 73 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | traceKind: TraceKind::SERVER |
| 105 | 105 | ); |
| 106 | 106 | |
| 107 | - foreach ($tracer->getContext() as $key => $value) { |
|
| 107 | + foreach ($tracer->getContext() as $key => $value){ |
|
| 108 | 108 | $response = $response->withHeader($key, $value); |
| 109 | 109 | } |
| 110 | 110 | |
@@ -33,7 +33,8 @@ discard block |
||
| 33 | 33 | private readonly ContainerInterface $container, |
| 34 | 34 | ?TracerFactoryInterface $tracerFactory = null |
| 35 | 35 | ) { |
| 36 | - foreach ($this->config->getMiddleware() as $middleware) { |
|
| 36 | + foreach ($this->config->getMiddleware() as $middleware) |
|
| 37 | + { |
|
| 37 | 38 | $this->pipeline->pushMiddleware($this->container->get($middleware)); |
| 38 | 39 | } |
| 39 | 40 | |
@@ -67,7 +68,8 @@ discard block |
||
| 67 | 68 | |
| 68 | 69 | $dispatcher?->dispatch(new RequestReceived($request)); |
| 69 | 70 | |
| 70 | - if ($this->handler === null) { |
|
| 71 | + if ($this->handler === null) |
|
| 72 | + { |
|
| 71 | 73 | throw new HttpException('Unable to run HttpCore, no handler is set.'); |
| 72 | 74 | } |
| 73 | 75 | |
@@ -104,7 +106,8 @@ discard block |
||
| 104 | 106 | traceKind: TraceKind::SERVER |
| 105 | 107 | ); |
| 106 | 108 | |
| 107 | - foreach ($tracer->getContext() as $key => $value) { |
|
| 109 | + foreach ($tracer->getContext() as $key => $value) |
|
| 110 | + { |
|
| 108 | 111 | $response = $response->withHeader($key, $value); |
| 109 | 112 | } |
| 110 | 113 | |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | $queue = m::mock(QueueInterface::class) |
| 23 | 23 | ); |
| 24 | 24 | $queue->shouldReceive('push')->once() |
| 25 | - ->withArgs(function (string $name, array $payload = [], OptionsInterface $options = null) { |
|
| 25 | + ->withArgs(function (string $name, array $payload = [], OptionsInterface $options = null){ |
|
| 26 | 26 | return $name === 'foo' && $payload === ['baz' => 'baf'] && $options instanceof Options; |
| 27 | 27 | }); |
| 28 | 28 | |
@@ -62,18 +62,18 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | |
| 64 | 64 | $tracer->shouldReceive('getContext')->once()->andReturn(['foo' => ['bar']]); |
| 65 | - $tracer->shouldReceive('trace')->once()->andReturnUsing(function ($name, $callback) { |
|
| 65 | + $tracer->shouldReceive('trace')->once()->andReturnUsing(function ($name, $callback){ |
|
| 66 | 66 | return $callback(); |
| 67 | 67 | }); |
| 68 | 68 | |
| 69 | 69 | $queue->shouldReceive('push')->once() |
| 70 | - ->withArgs(function (string $name, array $payload = [], OptionsInterface $options = null) { |
|
| 70 | + ->withArgs(function (string $name, array $payload = [], OptionsInterface $options = null){ |
|
| 71 | 71 | return $name === 'foo' |
| 72 | 72 | && $payload === ['baz' => 'baf'] |
| 73 | 73 | && $options->getHeader('foo') === ['bar']; |
| 74 | 74 | }); |
| 75 | 75 | |
| 76 | - ContainerScope::runScope($container, function() use($core) { |
|
| 76 | + ContainerScope::runScope($container, function () use($core) { |
|
| 77 | 77 | $core->callAction('foo', 'bar', [ |
| 78 | 78 | 'id' => 'job-id', |
| 79 | 79 | 'payload' => ['baz' => 'baf'], |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | $tracer->shouldNotReceive('getContext'); |
| 93 | 93 | |
| 94 | 94 | $queue->shouldReceive('push')->once() |
| 95 | - ->withArgs(function (string $name, array $payload = [], OptionsInterface $options = null) { |
|
| 95 | + ->withArgs(function (string $name, array $payload = [], OptionsInterface $options = null){ |
|
| 96 | 96 | return $name === 'foo' |
| 97 | 97 | && $payload === ['baz' => 'baf'] |
| 98 | 98 | && $options !== null; |
@@ -22,7 +22,8 @@ discard block |
||
| 22 | 22 | $queue = m::mock(QueueInterface::class) |
| 23 | 23 | ); |
| 24 | 24 | $queue->shouldReceive('push')->once() |
| 25 | - ->withArgs(function (string $name, array $payload = [], OptionsInterface $options = null) { |
|
| 25 | + ->withArgs(function (string $name, array $payload = [], OptionsInterface $options = null) |
|
| 26 | + { |
|
| 26 | 27 | return $name === 'foo' && $payload === ['baz' => 'baf'] && $options instanceof Options; |
| 27 | 28 | }); |
| 28 | 29 | |
@@ -62,18 +63,21 @@ discard block |
||
| 62 | 63 | |
| 63 | 64 | |
| 64 | 65 | $tracer->shouldReceive('getContext')->once()->andReturn(['foo' => ['bar']]); |
| 65 | - $tracer->shouldReceive('trace')->once()->andReturnUsing(function ($name, $callback) { |
|
| 66 | + $tracer->shouldReceive('trace')->once()->andReturnUsing(function ($name, $callback) |
|
| 67 | + { |
|
| 66 | 68 | return $callback(); |
| 67 | 69 | }); |
| 68 | 70 | |
| 69 | 71 | $queue->shouldReceive('push')->once() |
| 70 | - ->withArgs(function (string $name, array $payload = [], OptionsInterface $options = null) { |
|
| 72 | + ->withArgs(function (string $name, array $payload = [], OptionsInterface $options = null) |
|
| 73 | + { |
|
| 71 | 74 | return $name === 'foo' |
| 72 | 75 | && $payload === ['baz' => 'baf'] |
| 73 | 76 | && $options->getHeader('foo') === ['bar']; |
| 74 | 77 | }); |
| 75 | 78 | |
| 76 | - ContainerScope::runScope($container, function() use($core) { |
|
| 79 | + ContainerScope::runScope($container, function() use($core) |
|
| 80 | + { |
|
| 77 | 81 | $core->callAction('foo', 'bar', [ |
| 78 | 82 | 'id' => 'job-id', |
| 79 | 83 | 'payload' => ['baz' => 'baf'], |
@@ -92,7 +96,8 @@ discard block |
||
| 92 | 96 | $tracer->shouldNotReceive('getContext'); |
| 93 | 97 | |
| 94 | 98 | $queue->shouldReceive('push')->once() |
| 95 | - ->withArgs(function (string $name, array $payload = [], OptionsInterface $options = null) { |
|
| 99 | + ->withArgs(function (string $name, array $payload = [], OptionsInterface $options = null) |
|
| 100 | + { |
|
| 96 | 101 | return $name === 'foo' |
| 97 | 102 | && $payload === ['baz' => 'baf'] |
| 98 | 103 | && $options !== null; |