Code Duplication    Length = 10-10 lines in 2 locations

src/Conversation/Traits/SendsMessages.php 2 locations

@@ 41-50 (lines=10) @@
38
     * @param Attachment $attachment
39
     * @param int        $delay
40
     */
41
    protected function sendAttachment(Attachment $attachment, int $delay = 0): void
42
    {
43
        $command = new SendAttachment($this->getChat(), $this->getUser(), $attachment);
44
45
        if ($delay > 0) {
46
            $command->delay($delay);
47
        }
48
49
        kernel()->dispatch($command);
50
    }
51
52
    /**
53
     * Send request to the messaging service.
@@ 59-68 (lines=10) @@
56
     * @param array  $parameters
57
     * @param int    $delay
58
     */
59
    protected function sendRequest(string $endpoint, array $parameters = [], int $delay = 0): void
60
    {
61
        $command = new SendRequest($this->getChat(), $this->getUser(), $endpoint, $parameters);
62
63
        if ($delay > 0) {
64
            $command->delay($delay);
65
        }
66
67
        kernel()->dispatch($command);
68
    }
69
70
    /**
71
     * Get chat.