Skip to content

Commit c320a92

Browse files
committed
fix CS and rector
1 parent bfabe51 commit c320a92

4 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/Dto/DtoManager.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public static function serialize(array|object $data): array
6363
* Hydrate queue data back into a DTO instance.
6464
*
6565
* This method is not safe to use with user-defined `dtoClass` values.
66+
*
6667
* @template T of object
6768
* @param array<string, mixed> $data Serialized data.
6869
* @param class-string<T> $dtoClass DTO class name.

src/Queue/Processor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function processMessage(Message $message): string|object
122122
$callable = $message->getCallable();
123123
$response = $callable($message);
124124
if ($response === null) {
125-
$response = InteropProcessor::ACK;
125+
return InteropProcessor::ACK;
126126
}
127127

128128
return $response;

src/QueueManager.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ public static function setConfig(string|array $key, ?array $config = null): void
9292
}
9393

9494
return;
95-
} elseif (is_array($key)) {
95+
}
96+
97+
if (is_array($key)) {
9698
throw new LogicException('If config is not null, key must be a string.');
9799
}
98100

tests/test_app/src/Queue/TestCustomProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function processMessage(Message $message): string|object
110110
$callable = $message->getCallable();
111111
$response = $callable($message);
112112
if ($response === null) {
113-
$response = InteropProcessor::ACK;
113+
return InteropProcessor::ACK;
114114
}
115115

116116
return $response;

0 commit comments

Comments
 (0)