1 | <?php |
||
33 | class Ut3 extends Gamespy3 |
||
34 | { |
||
35 | |||
36 | /** |
||
37 | * String name of this protocol class |
||
38 | * |
||
39 | * @type string |
||
40 | */ |
||
41 | protected $name = 'ut3'; |
||
42 | |||
43 | /** |
||
44 | * Longer string name of this protocol class |
||
45 | * |
||
46 | * @type string |
||
47 | */ |
||
48 | protected $name_long = "Unreal Tournament 3"; |
||
49 | |||
50 | /** |
||
51 | * Normalize settings for this protocol |
||
52 | * |
||
53 | * @type array |
||
54 | */ |
||
55 | protected $normalize = [ |
||
56 | // General |
||
57 | 'general' => [ |
||
58 | 'dedicated' => 'bIsDedicated', |
||
59 | 'hostname' => 'hostname', |
||
60 | 'numplayers' => 'numplayers', |
||
61 | ], |
||
62 | ]; |
||
63 | |||
64 | /** |
||
65 | * Overload the response process so we can make some changes |
||
66 | * |
||
67 | * @return \GameQ\Result |
||
|
|||
68 | */ |
||
69 | 1 | public function processResponse() |
|
105 | |||
106 | /** |
||
107 | * Dirty hack to rename result entries into something more useful |
||
108 | * |
||
109 | * @param array $result |
||
110 | * @param string $old |
||
111 | * @param string $new |
||
112 | */ |
||
113 | 1 | protected function renameResult(array &$result, $old, $new) |
|
122 | |||
123 | /** |
||
124 | * Dirty hack to delete result items |
||
125 | * |
||
126 | * @param array $result |
||
127 | * @param array $array |
||
128 | */ |
||
129 | 1 | protected function deleteResult(array &$result, array $array) |
|
136 | } |
||
137 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.If the return type contains the type array, this check recommends the use of a more specific type like
String[]
orarray<String>
.