Skip to content

Add explicit @return to solve Symfony deprecation #1295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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