Code Duplication    Length = 12-12 lines in 2 locations

src/ZendeskChannel.php 2 locations

@@ 53-64 (lines=12) @@
50
     *
51
     * @param int $id
52
     */
53
    private function updateTicket($id)
54
    {
55
        $this->prepareUpdateParameters();
56
57
        try {
58
            $response = $this->client->tickets()->update($id, $this->parameters);
59
60
            event(new ZendeskTicketWasUpdated($response));
61
        } catch (\Exception $e) {
62
            throw CouldNotSendNotification::serviceRespondedWithAnError($e->getMessage());
63
        }
64
    }
65
66
    /**
67
     * Send create ticket request.
@@ 71-82 (lines=12) @@
68
     *
69
     * @param mixed $notifiable
70
     */
71
    private function createNewTicket($notifiable)
72
    {
73
        $this->prepareCreateParameters($notifiable);
74
75
        try {
76
            $response = $this->client->tickets()->create($this->parameters);
77
78
            event(new ZendeskTicketWasCreated($response));
79
        } catch (\Exception $e) {
80
            throw CouldNotSendNotification::serviceRespondedWithAnError($e->getMessage());
81
        }
82
    }
83
84
    /**
85
     * Prepare the parameters before update request send.