This class 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...
30
{
31
/**
32
* @var Client
33
*/
34
private $client;
35
36
/**
37
* @var StatefulStomp
38
*/
39
private $stomp;
40
41
/**
42
* @param Client $client
43
*/
44
public function __construct(Client $client)
45
{
46
$this->client = $client;
47
$this->stomp = new StatefulStomp($client);
48
}
49
50
/**
51
* @param Message $message
52
* @param null $key
53
*/
54
public function publish(Message $message, $key = null)
55
{
56
$this->stomp->send($key, new StompMessage($message->getBody(), $message->getProperties()));
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.