Completed
Push — master ( e5efba...5eb024 )
by Ivan
19:40
created

Client::send()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 0
cts 4
cp 0
crap 2
1
<?php namespace FreedomCore\TrinityCore\Console;
2
3
use FreedomCore\TrinityCore\Console\Abstracts\BaseClient;
4
use FreedomCore\TrinityCore\Console\Commands\Account;
5
use FreedomCore\TrinityCore\Console\Commands\BNetAccount;
6
use FreedomCore\TrinityCore\Console\Commands\GM;
7
use FreedomCore\TrinityCore\Console\Commands\Guild;
8
use FreedomCore\TrinityCore\Console\Commands\LFG;
9
use FreedomCore\TrinityCore\Console\Commands\Character;
10
use FreedomCore\TrinityCore\Console\Commands\Reset;
11
use FreedomCore\TrinityCore\Console\Commands\Send;
12
use FreedomCore\TrinityCore\Console\Commands\Server;
13
14
/**
15
 * Class Client
16
 * @package FreedomCore\TrinityCore\Console
17
 */
18
class Client extends BaseClient
19
{
20
21
    /**
22
     * Client constructor.
23
     * @param string $username Username used to connect to the server
24
     * @param string $password Password used to connect to the server
25
     * @param boolean $createNow Should the connection be created as soon as possible
26
     * @throws \Exception
27
     */
28
    public function __construct(string $username, string $password, bool $createNow = true)
29
    {
30
        parent::__construct($username, $password, $createNow);
31
    }
32
33
    /**
34
     * Get Account Command Instance
35
     * @return Account
36
     */
37
    public function account() : Account
38
    {
39
        return (new Account($this->client));
40
    }
41
42
    /**
43
     * Get Bnet Command Instance
44
     * @return BNetAccount
45
     */
46
    public function bnet() : BNetAccount
47
    {
48
        return (new BNetAccount($this->client));
49
    }
50
51
    /**
52
     * Get Character Command Instance
53
     * @return Character
54
     */
55
    public function character() : Character
56
    {
57
        return (new Character($this->client));
58
    }
59
60
    /**
61
     * Get GM Command Instance
62
     * @return GM
63
     */
64
    public function gm() : GM
65
    {
66
        return (new GM($this->client));
67
    }
68
69
    /**
70
     * Get Guild Command Instance
71
     * @return Guild
72
     */
73
    public function guild() : Guild
74
    {
75
        return (new Guild($this->client));
76
    }
77
78
    /**
79
     * Get LFG Command Instance
80
     * @return LFG
81
     */
82
    public function lfg() : LFG
83
    {
84
        return (new LFG($this->client));
85
    }
86
87
    /**
88
     * Get Reset Command Instance
89
     * @return Reset
90
     */
91
    public function reset() : Reset
92
    {
93
        return (new Reset($this->client));
94
    }
95
96
    /**
97
     * Get Send Command Instance
98
     * @return Send
99
     */
100
    public function send() : Send
101
    {
102
        return (new Send($this->client));
103
    }
104
    
105
    /**
106
     * Get Server Command Instance
107
     * @return Server
108
     */
109
    public function server() : Server
110
    {
111
        return (new Server($this->client));
112
    }
113
}
114