Passed
Pull Request — v3 (#645)
by
unknown
30:38
created
src/GameQ/Server.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
                 $server_addr = explode(':', $ip_address);
171 171
 
172 172
                 // Port is the last item in the array, remove it and save
173
-                $this->port_client = (int)array_pop($server_addr);
173
+                $this->port_client = (int) array_pop($server_addr);
174 174
 
175 175
                 // The rest is the address, recombine
176 176
                 $this->ip = implode(':', $server_addr);
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
             }
186 186
 
187 187
             // Now let's validate the IPv6 value sent, remove the square brackets ([]) first
188
-            if (!filter_var(trim($this->ip, '[]'), FILTER_VALIDATE_IP, ['flags' => FILTER_FLAG_IPV6,])) {
188
+            if (!filter_var(trim($this->ip, '[]'), FILTER_VALIDATE_IP, ['flags' => FILTER_FLAG_IPV6, ])) {
189 189
                 throw new Exception("The IPv6 address '{$this->ip}' is invalid.");
190 190
             }
191 191
         } else {
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
                 list($this->ip, $this->port_client) = explode(':', $ip_address);
195 195
 
196 196
                 // Type case the port
197
-                $this->port_client = (int)$this->port_client;
197
+                $this->port_client = (int) $this->port_client;
198 198
             } else {
199 199
                 // No port, fail
200 200
                 throw new Exception(
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
             }
205 205
 
206 206
             // Validate the IPv4 value, if FALSE is not a valid IP, maybe a hostname.
207
-            if (! filter_var($this->ip, FILTER_VALIDATE_IP, ['flags' => FILTER_FLAG_IPV4,])) {
207
+            if (!filter_var($this->ip, FILTER_VALIDATE_IP, ['flags' => FILTER_FLAG_IPV4, ])) {
208 208
                 // Try to resolve the hostname to IPv4
209 209
                 $resolved = gethostbyname($this->ip);
210 210
 
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 
228 228
         // Specific query port defined
229 229
         if (array_key_exists(self::SERVER_OPTIONS_QUERY_PORT, $this->options)) {
230
-            $this->port_query = (int)$this->options[self::SERVER_OPTIONS_QUERY_PORT];
230
+            $this->port_query = (int) $this->options[self::SERVER_OPTIONS_QUERY_PORT];
231 231
         } else {
232 232
             // Do math based on the protocol class
233 233
             $this->port_query = $this->protocol->findQueryPort($this->port_client);
Please login to merge, or discard this patch.
src/GameQ/Protocols/Gamespy2.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -227,7 +227,7 @@
 block discarded – undo
227 227
      *
228 228
      * @throws Exception
229 229
      */
230
-    protected function parsePlayerTeam($dataType, Buffer &$buffer, Result &$result)
230
+    protected function parsePlayerTeam($dataType, Buffer & $buffer, Result & $result)
231 231
     {
232 232
 
233 233
         // Do count
Please login to merge, or discard this patch.
src/GameQ/Protocols/Arma3.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@
 block discarded – undo
191 191
             $result->addSub('mods', 'steam_id', $responseBuffer->readInt32($infoByte & 0x0F));
192 192
 
193 193
             // Read the name of the mod
194
-            $result->addSub('mods', 'name', $responseBuffer->readPascalString(0, true) ?: 'Unknown');
194
+            $result->addSub('mods', 'name', $responseBuffer->readPascalString(0, true) ? : 'Unknown');
195 195
 
196 196
             --$modCount;
197 197
         }
Please login to merge, or discard this patch.
src/GameQ/Filters/Normalize.php 3 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -61,19 +61,19 @@  discard block
 block discarded – undo
61 61
         $result = array_merge($result, $this->check('general', $result));
62 62
 
63 63
         // Check FiveM Player List
64
-	    if ($result['gq_protocol'] == "gta5m") {
65
-		    $result = $this->getFiveMPlayerList($result, sprintf('%s:%s', (isset($result['gq_address'])) ? $result['gq_address'] : $server->ip(), $result['gq_port_client']));
66
-	    }else{
64
+        if ($result['gq_protocol'] == "gta5m") {
65
+            $result = $this->getFiveMPlayerList($result, sprintf('%s:%s', (isset($result['gq_address'])) ? $result['gq_address'] : $server->ip(), $result['gq_port_client']));
66
+        }else{
67 67
             // Do player information
68 68
             if (isset($result['players']) && count($result['players']) > 0) {
69 69
                 // Iterate
70 70
                 foreach ($result['players'] as $key => $player) {
71 71
                     $result['players'][$key] = array_merge($player, $this->check('player', $player));
72
-            	}
72
+                }
73 73
             } else {
74 74
                 $result['players'] = [];
75 75
             }
76
-	    }
76
+        }
77 77
 
78 78
         // Do team information
79 79
         if (isset($result['teams']) && count($result['teams']) > 0) {
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             foreach ($data as $player) {
109 109
                 $players[] = $player->name;
110 110
             }
111
-	        $result['players'] = $players;
111
+            $result['players'] = $players;
112 112
             return $result;
113 113
         }
114 114
         return [];
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
         // Check FiveM Player List
64 64
 	    if ($result['gq_protocol'] == "gta5m") {
65 65
 		    $result = $this->getFiveMPlayerList($result, sprintf('%s:%s', (isset($result['gq_address'])) ? $result['gq_address'] : $server->ip(), $result['gq_port_client']));
66
-	    }else{
66
+	    } else {
67 67
             // Do player information
68 68
             if (isset($result['players']) && count($result['players']) > 0) {
69 69
                 // Iterate
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
         // Check FiveM Player List
64 64
 	    if ($result['gq_protocol'] == "gta5m") {
65 65
 		    $result = $this->getFiveMPlayerList($result, sprintf('%s:%s', (isset($result['gq_address'])) ? $result['gq_address'] : $server->ip(), $result['gq_port_client']));
66
-	    }else{
66
+	    } else{
67 67
             // Do player information
68 68
             if (isset($result['players']) && count($result['players']) > 0) {
69 69
                 // Iterate
Please login to merge, or discard this patch.