Code Duplication    Length = 8-9 lines in 3 locations

source/commands/Send.php 3 locations

@@ 39-46 (lines=8) @@
36
     * @param string $mailText
37
     * @return array|string
38
     */
39
    public function mail(string $playerName, string $mailSubject, string $mailText)
40
    {
41
        return $this->executeCommand(__FUNCTION__, [
42
            'playerName'    =>  $playerName,
43
            'mailSubject'   =>  $this->inQuotes($mailSubject),
44
            'mailText'      =>  $this->inQuotes($mailText)
45
        ]);
46
    }
47
48
    /**
49
     * Send message to the player which will appear in the middle of the screen
@@ 67-75 (lines=9) @@
64
     * @param int $amount
65
     * @return array|string
66
     */
67
    public function money(string $playerName, string $mailSubject, string $mailText, int $amount)
68
    {
69
        return $this->executeCommand(__FUNCTION__, [
70
            'playerName'    =>  $playerName,
71
            'mailSubject'   =>  $this->inQuotes($mailSubject),
72
            'mailText'      =>  $this->inQuotes($mailText),
73
            'amount'        =>  $amount
74
        ]);
75
    }
76
}
77
@@ 22-30 (lines=9) @@
19
     * @param Items $items
20
     * @return array|string
21
     */
22
    public function items(string $playerName, string $mailSubject, string $mailText, Items $items)
23
    {
24
        return $this->executeCommand(__FUNCTION__, [
25
            'playerName'    =>  $playerName,
26
            'mailSubject'   =>  $this->inQuotes($mailSubject),
27
            'mailText'      =>  $this->inQuotes($mailText),
28
            'items'         =>  $items->toCommandAttribute()
29
        ]);
30
    }
31
32
    /**
33
     * Send mail to the player