Passed
Pull Request — v3 (#729)
by
unknown
38:39 queued 03:37
created
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/Protocols/Raknet.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -147,16 +147,16 @@
 block discarded – undo
147 147
 
148 148
         $result->add('edition', $info[0]);
149 149
         $result->add('motd_line_1', $info[1]);
150
-        $result->add('protocol_version', (int)$info[2]);
150
+        $result->add('protocol_version', (int) $info[2]);
151 151
         $result->add('version', $info[3]);
152
-        $result->add('num_players', (int)$info[4]);
153
-        $result->add('max_players', (int)$info[5]);
152
+        $result->add('num_players', (int) $info[4]);
153
+        $result->add('max_players', (int) $info[5]);
154 154
         $result->add('server_uid', $info[6]);
155 155
         $result->add('motd_line_2', $info[7]);
156 156
         $result->add('gamemode', $info[8]);
157
-        $result->add('gamemode_numeric', (int)$info[9]);
158
-        $result->add('port_ipv4', (isset($info[10])) ? (int)$info[10] : null);
159
-        $result->add('port_ipv6', (isset($info[11])) ? (int)$info[11] : null);
157
+        $result->add('gamemode_numeric', (int) $info[9]);
158
+        $result->add('port_ipv4', (isset($info[10])) ? (int) $info[10] : null);
159
+        $result->add('port_ipv6', (isset($info[11])) ? (int) $info[11] : null);
160 160
         $result->add('dedicated', 1);
161 161
 
162 162
         unset($header, $serverGUID, $magicCheck, $info);
Please login to merge, or discard this patch.
src/GameQ/Protocols/Cs2d.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -192,12 +192,12 @@
 block discarded – undo
192 192
         $serverFlags = $buffer->readInt8();
193 193
 
194 194
         // Read server flags
195
-        $result->add('password', (int)$this->readFlag($serverFlags, 0));
196
-        $result->add('registered_only', (int)$this->readFlag($serverFlags, 1));
197
-        $result->add('fog_of_war', (int)$this->readFlag($serverFlags, 2));
198
-        $result->add('friendly_fire', (int)$this->readFlag($serverFlags, 3));
199
-        $result->add('bots_enabled', (int)$this->readFlag($serverFlags, 5));
200
-        $result->add('lua_scripts', (int)$this->readFlag($serverFlags, 6));
195
+        $result->add('password', (int) $this->readFlag($serverFlags, 0));
196
+        $result->add('registered_only', (int) $this->readFlag($serverFlags, 1));
197
+        $result->add('fog_of_war', (int) $this->readFlag($serverFlags, 2));
198
+        $result->add('friendly_fire', (int) $this->readFlag($serverFlags, 3));
199
+        $result->add('bots_enabled', (int) $this->readFlag($serverFlags, 5));
200
+        $result->add('lua_scripts', (int) $this->readFlag($serverFlags, 6));
201 201
 
202 202
         // Read the rest of the buffer data
203 203
         $result->add('servername', static::isoToUtf8($buffer->readPascalString(0)));
Please login to merge, or discard this patch.
src/GameQ/Filters/Secondstohuman.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     public function __construct(array $options = [])
61 61
     {
62 62
         // Check for passed keys
63
-        if (! array_key_exists(self::OPTION_TIMEKEYS, $options)) {
63
+        if (!array_key_exists(self::OPTION_TIMEKEYS, $options)) {
64 64
             // Use default
65 65
             $options[self::OPTION_TIMEKEYS] = $this->timeKeysDefault;
66 66
         } else {
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                 (is_numeric($value))
91 91
             ) {
92 92
                 /* Ensure the value is float */
93
-                if (! is_float($value)) {
93
+                if (!is_float($value)) {
94 94
                     $value = floatval($value);
95 95
                 }
96 96
 
@@ -101,9 +101,9 @@  discard block
 block discarded – undo
101 101
                     /* Format the provided time */
102 102
                     sprintf(
103 103
                         '%02d:%02d:%02d',
104
-                        (int)floor($value / 3600),    // Hours
105
-                        (int)fmod(($value / 60), 60), // Minutes
106
-                        (int)fmod($value, 60)         // Seconds
104
+                        (int) floor($value / 3600), // Hours
105
+                        (int) fmod(($value / 60), 60), // Minutes
106
+                        (int) fmod($value, 60)         // Seconds
107 107
                     )
108 108
                 );
109 109
             }
Please login to merge, or discard this patch.
src/GameQ/Filters/Normalize.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,11 +57,11 @@  discard block
 block discarded – undo
57 57
     public function apply(array $result, Server $server)
58 58
     {
59 59
         /* Determine if there is data to be processed */
60
-        if (! empty($result)) {
60
+        if (!empty($result)) {
61 61
             /* Handle unit test data generation */
62 62
             if ($this->writeTestData) {
63 63
                 /* Initialize potential data for unit testing **/
64
-                $unitTestData = [ ];
64
+                $unitTestData = [];
65 65
 
66 66
                 /* Add the initial result to the unit test data */
67 67
                 $unitTestData['raw'][$server->id()] = $result;
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             /* Process each mapping individually */
127 127
             foreach ($this->normalize[$section] as $target => $source) {
128 128
                 /* Treat explicit source like implicit sources */
129
-                if (! is_array($source)) {
129
+                if (!is_array($source)) {
130 130
                     $source = [$source];
131 131
                 }
132 132
 
@@ -135,13 +135,13 @@  discard block
 block discarded – undo
135 135
                     /* Determine if the current source does exist */
136 136
                     if (array_key_exists($s, $data)) {
137 137
                         /* Add the normalized mapping */
138
-                        $normalized['gq_'.$target] = $data[$s];
138
+                        $normalized['gq_' . $target] = $data[$s];
139 139
                         break;
140 140
                     }
141 141
                 }
142 142
 
143 143
                 /* Write null in case no source was found */
144
-                $normalized['gq_'.$target] = isset($normalized['gq_'.$target]) ? $normalized['gq_'.$target] : null;
144
+                $normalized['gq_' . $target] = isset($normalized['gq_' . $target]) ? $normalized['gq_' . $target] : null;
145 145
             }
146 146
         }
147 147
 
Please login to merge, or discard this patch.
src/GameQ/Filters/Stripcolors.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
     public function apply(array $result, Server $server)
53 53
     {
54 54
         /* Prevent working on empty results */
55
-        if (! empty($result)) {
55
+        if (!empty($result)) {
56 56
             /* Handle unit test data generation */
57 57
             if ($this->writeTestData) {
58 58
                 /* Initialize potential data for unit testing **/
Please login to merge, or discard this patch.