diff --git a/src/ContainerRegistry.php b/src/ContainerRegistry.php index aae2d3b..323988b 100644 --- a/src/ContainerRegistry.php +++ b/src/ContainerRegistry.php @@ -38,7 +38,7 @@ public function getHandler(string $jobType): HandlerInterface private function className(string $jobType): string { $names = \explode('.', $jobType); - $names = \array_map(fn (string $value) => $this->inflector->classify($value), $names); + $names = \array_map(fn (string $value): string => $this->inflector->classify($value), $names); return \implode('\\', $names); } diff --git a/tests/Interceptor/Push/CoreTest.php b/tests/Interceptor/Push/CoreTest.php index 0b3b1dc..c09d6bd 100644 --- a/tests/Interceptor/Push/CoreTest.php +++ b/tests/Interceptor/Push/CoreTest.php @@ -30,7 +30,7 @@ public function testCallActionWithNullOptions(mixed $payload): void } $queue->shouldReceive('push')->once() - ->withArgs(fn(string $name, mixed $p = [], ?OptionsInterface $options = null) => $name === 'foo' + ->withArgs(fn(string $name, mixed $p = [], ?OptionsInterface $options = null): bool => $name === 'foo' && $payload === $p && $options instanceof Options, ); @@ -80,7 +80,7 @@ public function testCallWithTracerContext(): void $tracer->shouldReceive('trace')->once()->andReturnUsing(fn($name, $callback) => $callback()); $queue->shouldReceive('push')->once() - ->withArgs(fn(string $name, array $payload = [], ?OptionsInterface $options = null) => $name === 'foo' + ->withArgs(fn(string $name, array $payload = [], ?OptionsInterface $options = null): bool => $name === 'foo' && $payload === ['baz' => 'baf'] && $options->getHeader('foo') === ['bar']); @@ -103,7 +103,7 @@ public function testCallWithTracerContextWitoutOptionsWithHeadersSupport(): void $tracer->shouldNotReceive('getContext'); $queue->shouldReceive('push')->once() - ->withArgs(fn(string $name, array $payload = [], ?OptionsInterface $options = null) => $name === 'foo' + ->withArgs(fn(string $name, array $payload = [], ?OptionsInterface $options = null): bool => $name === 'foo' && $payload === ['baz' => 'baf'] && $options !== null);