Passed
Pull Request — v3 (#729)
by
unknown
31:41
created
src/GameQ/Filters/Stripcolors.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
     public function apply(array $result, Server $server)
51 51
     {
52 52
         /* Prevent working on empty results */
53
-        if (! empty($result)) {
53
+        if (!empty($result)) {
54 54
             /* Handle unit test data generation */ 
55 55
             if ($this->writeTestData) {
56 56
                 /* Initialize potential data for unit testing **/
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/Normalize.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
         }
60 60
 
61 61
         /* Determine if there is data to be processed */
62
-        if (! empty($result)) {
62
+        if (!empty($result)) {
63 63
             /* Handle unit test data generation */ 
64 64
             if ($this->writeTestData) {
65 65
                 /* Initialize potential data for unit testing **/
66
-                $unitTestData = [ ];
66
+                $unitTestData = [];
67 67
 
68 68
                 /* Add the initial result to the unit test data */
69 69
                 $unitTestData['raw'][$server->id()] = $result;
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
             /* Process each mapping individually */
129 129
             foreach ($this->normalize[$section] as $target => $source) {
130 130
                 /* Treat explicit source like implicit sources */
131
-                if (! is_array($source)) {
131
+                if (!is_array($source)) {
132 132
                     $source = [$source];
133 133
                 }
134 134
 
@@ -137,13 +137,13 @@  discard block
 block discarded – undo
137 137
                     /* Determine if the current source does exist */
138 138
                     if (array_key_exists($s, $data)) {
139 139
                         /* Add the normalized mapping */
140
-                        $normalized['gq_'.$target] = $data[$s];
140
+                        $normalized['gq_' . $target] = $data[$s];
141 141
                         break;
142 142
                     }
143 143
                 }
144 144
 
145 145
                 /* Write null in case no source was found */
146
-                $normalized['gq_'.$target] = $normalized['gq_'.$target] ?? null;
146
+                $normalized['gq_' . $target] = $normalized['gq_' . $target] ?? null;
147 147
             }
148 148
         }
149 149
 
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.