Code Duplication    Length = 8-9 lines in 2 locations

src/Kernel/BaseMessenger.php 1 location

@@ 35-43 (lines=9) @@
32
     *
33
     * @return $this
34
     */
35
    public function message($message)
36
    {
37
        if (is_string($message) || is_int($message)) {
38
            $message = new Text($message);
39
        }
40
41
        $this->message = $message;
42
43
        return $this;
44
    }
45
46
    abstract public function send();

src/Kernel/Messages/Message.php 1 location

@@ 46-53 (lines=8) @@
43
     *
44
     * @return \EasyDingTalk\Kernel\Messages\Message
45
     */
46
    public static function parse($message): Message
47
    {
48
        if (is_int($message) || is_string($message)) {
49
            $message = new Text($message);
50
        }
51
52
        return $message;
53
    }
54
55
    public function type()
56
    {