Skip to content

Commit

Permalink
Merge pull request #1295 from VincentLanglet/patch-1
Browse files Browse the repository at this point in the history
Add explicit @return to solve Symfony deprecation
  • Loading branch information
makasim authored Aug 16, 2023
2 parents 8c7edb2 + aadd3d9 commit 85a6bec
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions pkg/enqueue/Client/DelegateProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,21 @@ class DelegateProcessor implements Processor
*/
private $registry;

/**
* @param ProcessorRegistryInterface $registry
*/
public function __construct(ProcessorRegistryInterface $registry)
{
$this->registry = $registry;
}

/**
* {@inheritdoc}
*
* @return string|object
*/
public function process(InteropMessage $message, Context $context)
{
$processorName = $message->getProperty(Config::PROCESSOR);
if (false == $processorName) {
throw new \LogicException(sprintf(
'Got message without required parameter: "%s"',
Config::PROCESSOR
));
throw new \LogicException(sprintf('Got message without required parameter: "%s"', Config::PROCESSOR));
}

return $this->registry->get($processorName)->process($message, $context);
Expand Down

0 comments on commit 85a6bec

Please sign in to comment.