1 | <?php namespace FreedomCore\TrinityCore\Console; |
||
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 | 38 | public function __construct(string $username, string $password, bool $createNow = true) |
|
32 | |||
33 | /** |
||
34 | * Get Account Command Instance |
||
35 | * @return Account |
||
36 | */ |
||
37 | 2 | public function account() : Account |
|
41 | |||
42 | /** |
||
43 | * Get Bnet Command Instance |
||
44 | * @return BNetAccount |
||
45 | */ |
||
46 | 2 | public function bnet() : BNetAccount |
|
50 | |||
51 | /** |
||
52 | * Get Character Command Instance |
||
53 | * @return Character |
||
54 | */ |
||
55 | 2 | public function character() : Character |
|
59 | |||
60 | /** |
||
61 | * Get GM Command Instance |
||
62 | * @return GM |
||
63 | */ |
||
64 | 2 | public function gm() : GM |
|
68 | |||
69 | /** |
||
70 | * Get Guild Command Instance |
||
71 | * @return Guild |
||
72 | */ |
||
73 | 2 | public function guild() : Guild |
|
77 | |||
78 | /** |
||
79 | * Get LFG Command Instance |
||
80 | * @return LFG |
||
81 | */ |
||
82 | 2 | public function lfg() : LFG |
|
86 | |||
87 | /** |
||
88 | * Get Reset Command Instance |
||
89 | * @return Reset |
||
90 | */ |
||
91 | 2 | public function reset() : Reset |
|
95 | |||
96 | /** |
||
97 | * Get Send Command Instance |
||
98 | * @return Send |
||
99 | */ |
||
100 | 2 | public function send() : Send |
|
104 | |||
105 | /** |
||
106 | * Get Server Command Instance |
||
107 | * @return Server |
||
108 | */ |
||
109 | 2 | public function server() : Server |
|
113 | } |
||
114 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: