Guild::info()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php namespace FreedomCore\TrinityCore\Console\Commands;
2
3
use FreedomCore\TrinityCore\Console\Abstracts\BaseCommand;
4
5
/**
6
 * Class Guild
7
 * @package FreedomCore\TrinityCore\Console\Commands
8
 * @codeCoverageIgnore
9
 */
10
class Guild extends BaseCommand
11
{
12
13
    /**
14
     * Create new guild
15
     * Player MUST be online
16
     * @param string $leaderName
17
     * @param string $guildName
18
     * @return array|string
19
     */
20
    public function create(string $leaderName, string $guildName)
21
    {
22
        return $this->executeCommand(__FUNCTION__, [
23
            'leaderName'    =>  $leaderName,
24
            'guildName'     =>  $this->inQuotes($guildName)
25
        ]);
26
    }
27
28
    /**
29
     * Delete specified guild
30
     * @param string $guildName
31
     * @return array|string
32
     */
33
    public function delete(string $guildName)
34
    {
35
        return $this->executeCommand(__FUNCTION__, ['guildName'     =>  $this->inQuotes($guildName)]);
36
    }
37
38
    /**
39
     * Invite Specified Player To Specified Guild
40
     * @param string $playerName
41
     * @param string $guildName
42
     * @return array|string
43
     */
44
    public function invite(string $playerName, string $guildName)
45
    {
46
        return $this->executeCommand(__FUNCTION__, [
47
            'playerName'    =>  $playerName,
48
            'guildName'     =>  $this->inQuotes($guildName)
49
        ]);
50
    }
51
52
    /**
53
     * Rename Guild
54
     * @param string $oldName
55
     * @param string $newName
56
     * @return array|string
57
     */
58
    public function rename(string $oldName, string $newName)
59
    {
60
        return $this->executeCommand(__FUNCTION__, [
61
            'oldName'   =>  $this->inQuotes($oldName),
62
            'newName'   =>  $this->inQuotes($newName)
63
        ]);
64
    }
65
66
    /**
67
     * Get Information About Specified Guild
68
     * @param string $guildName
69
     * @return array|string
70
     */
71
    public function info(string $guildName)
72
    {
73
        return $this->executeCommand(__FUNCTION__, [
74
            'guildName' =>  $this->inQuotes($guildName)
75
        ]);
76
    }
77
}
78