Code Duplication    Length = 13-13 lines in 2 locations

src/Channel/ChannelComposite.php 1 location

@@ 211-223 (lines=13) @@
208
     * @override
209
     * @inheritDoc
210
     */
211
    public function createProtocol($message = null)
212
    {
213
        if ($message === null)
214
        {
215
            $message = '';
216
        }
217
        else if (!is_array($message))
218
        {
219
            $message = (string) $message;
220
        }
221
222
        return new Protocol('', $this->genID(), '', '', $message);
223
    }
224
225
    /**
226
     * @override

src/Channel/Channel.php 1 location

@@ 236-248 (lines=13) @@
233
     * @override
234
     * @inheritDoc
235
     */
236
    public function createProtocol($message = null)
237
    {
238
        if ($message === null)
239
        {
240
            $message = '';
241
        }
242
        else if (!is_array($message))
243
        {
244
            $message = (string) $message;
245
        }
246
247
        return new Protocol('', $this->genID(), '', $this->name, $message, '', $this->getTime());
248
    }
249
250
    /**
251
     * @override