This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
41
{
42
$this->driver->send($message);
43
44
$this->log(
45
LogLevel::INFO,
46
"Dispatcher send message #{$message->getId()} to driver " . get_class($this->driver),
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
60
{
61
return [
62
'id' => $message->getId(),
63
'created' => $message->getCreated(),
64
'type' => $message->getType(),
65
'payload' => $message->getPayload(),
66
];
67
}
68
69
/**
70
* Interal log method wrapper
71
*
72
* @param string $level
73
* @param string $message
74
* @param array $context
75
*
76
* @return void
77
*/
78
private function log($level, $message, array $context = array())
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.