Completed
Pull Request — master (#10)
by
unknown
02:00
created
src/Components/WscMain.php 2 patches
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     }
123 123
 
124 124
     /**
125
-     * @param        $payload
125
+     * @param        string $payload
126 126
      * @param string $opCode
127 127
      * @param bool   $masked
128 128
      *
@@ -218,10 +218,10 @@  discard block
 block discarded – undo
218 218
     }
219 219
 
220 220
     /**
221
-     * @param $final
222
-     * @param $payload
223
-     * @param $opCode
224
-     * @param $masked
221
+     * @param boolean $final
222
+     * @param string $payload
223
+     * @param string $opCode
224
+     * @param boolean $masked
225 225
      *
226 226
      * @throws ConnectionException
227 227
      * @throws \Exception
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
      * @param integer $status  http://tools.ietf.org/html/rfc6455#section-7.4
424 424
      * @param string  $message A closing message, max 125 bytes.
425 425
      *
426
-     * @return bool|null|string
426
+     * @return null|string
427 427
      * @throws BadOpcodeException
428 428
      * @throws BadUriException
429 429
      * @throws ConnectionException
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
     }
553 553
 
554 554
     /**
555
-     * @return mixed|resource
555
+     * @return resource|null
556 556
      * @throws \InvalidArgumentException
557 557
      */
558 558
     private function getStreamContext()
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
     private function getPayloadData(string $data, int $payloadLength)
375 375
     {
376 376
         // Masking?
377
-        $mask = (bool) (\ord($data[1]) >> 7);  // Bit 0 in byte 1
377
+        $mask = (bool) (\ord($data[1]) >> 7); // Bit 0 in byte 1
378 378
         $payload = '';
379 379
         $maskingKey = '';
380 380
         // Get masking key.
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
      */
598 598
     private function getHeaders(string $pathWithQuery, array $headers): string
599 599
     {
600
-        return 'GET ' . $pathWithQuery . " HTTP/1.1\r\n" . \implode("\r\n", \array_map(function ($key, $value) {
600
+        return 'GET ' . $pathWithQuery . " HTTP/1.1\r\n" . \implode("\r\n", \array_map(function($key, $value) {
601 601
                 return "$key: $value";
602 602
             }, \array_keys($headers), $headers)) . "\r\n\r\n";
603 603
     }
Please login to merge, or discard this patch.