Code Duplication    Length = 10-10 lines in 2 locations

src/Slack/Client.php 2 locations

@@ 124-133 (lines=10) @@
121
        $this->realTimeClient->send($text, $channel);
122
    }
123
124
    public function post($text, ChannelInterface $channel, array $additionalParameters = [])
125
    {
126
        $parameters = array_merge([
127
            'text' => $text,
128
            'channel' => $channel->getId(),
129
            'as_user' => true,
130
        ], $additionalParameters);
131
132
        $this->realTimeClient->apiCall('chat.postMessage', $parameters);
133
    }
134
135
    public function directMessage($text, $userName)
136
    {
@@ 135-144 (lines=10) @@
132
        $this->realTimeClient->apiCall('chat.postMessage', $parameters);
133
    }
134
135
    public function directMessage($text, $userName)
136
    {
137
        $parameters = [
138
            'text' => $text,
139
            'channel' => $userName,
140
            'as_user' => false,
141
        ];
142
143
        $this->realTimeClient->apiCall('chat.postMessage', $parameters);
144
    }
145
146
    /**
147
     * @param $id