Completed
Push — master ( d3a19f...990ada )
by Arthur
02:26
created
src/Components/WscMain.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         return 'GET ' . $pathWithQuery . " HTTP/1.1\r\n"
182 182
             . implode(
183 183
                 "\r\n", array_map(
184
-                    function ($key, $value) {
184
+                    function($key, $value) {
185 185
                         return "$key: $value";
186 186
                     }, array_keys($headers), $headers
187 187
                 )
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
         // Binary string for header.
282 282
         $frameHeadBin = '';
283 283
         // Write FIN, final fragment bit.
284
-        $frameHeadBin .= (bool)$final ? '1' : '0';
284
+        $frameHeadBin .= (bool) $final ? '1' : '0';
285 285
         // RSV 1, 2, & 3 false and unused.
286 286
         $frameHeadBin .= '000';
287 287
         // Opcode rest of the byte.
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
 
352 352
         // Is this the final fragment?  // Bit 0 in byte 0
353 353
         /// @todo Handle huge payloads with multiple fragments.
354
-        $final = (bool)(ord($data[0]) & 1 << 7);
354
+        $final = (bool) (ord($data[0]) & 1 << 7);
355 355
 
356 356
         // Parse opcode
357 357
         $opcode_int  = ord($data[0]) & 31; // Bits 4-7
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
     private function getPayloadData(string $data, int $payloadLength)
412 412
     {
413 413
         // Masking?
414
-        $mask       = (bool)(ord($data[1]) >> 7);  // Bit 0 in byte 1
414
+        $mask       = (bool) (ord($data[1]) >> 7); // Bit 0 in byte 1
415 415
         $payload    = '';
416 416
         $maskingKey = '';
417 417
         // Get masking key.
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
      */
442 442
     private function getPayloadLength(string $data)
443 443
     {
444
-        $payloadLength = (int)ord($data[1]) & self::MASK_127; // Bits 1-7 in byte 1
444
+        $payloadLength = (int) ord($data[1]) & self::MASK_127; // Bits 1-7 in byte 1
445 445
         if ($payloadLength > self::MASK_125) {
446 446
             if ($payloadLength === self::MASK_126) {
447 447
                 $data = $this->read(2); // 126: Payload is a 16-bit unsigned int
Please login to merge, or discard this patch.