@@ -709,14 +709,14 @@ protected static function exceptionOnFalse(?SocketResource $resource, callable $
709
709
* <p>The function <code>write()</code> writes to the socket from the given buffer.</p>
710
710
*
711
711
* @param string $buffer The buffer to be written.
712
- * @param ? int $length The optional parameter length can specify an alternate length of bytes written to the
712
+ * @param int|null $length The optional parameter length can specify an alternate length of bytes written to the
713
713
* socket. If this length is greater than the buffer length, it is silently truncated to the length of the buffer.
714
714
*
715
715
* @return int Returns the number of bytes successfully written to the socket.
716
716
* @throws SocketException If there was a failure.
717
717
*
718
718
*/
719
- public function write (string $ buffer , int $ length = null ): int
719
+ public function write (string $ buffer , ? int $ length = null ): int
720
720
{
721
721
if (null === $ length ) {
722
722
$ length = strlen ($ buffer );
@@ -753,13 +753,13 @@ public function write(string $buffer, int $length = null): int
753
753
* <li><code>MSG_EOF</code> - Close the sender side of the socket and include an appropriate notification
754
754
* of this at the end of the sent data. The sent data completes the transaction.</li>
755
755
* <li><code>MSG_DONTROUTE</code> - Bypass routing, use direct interface.</li></ul></p>
756
- * @param int $length The number of bytes that will be sent to the remote host from buffer.
756
+ * @param int|null $length The number of bytes that will be sent to the remote host from buffer.
757
757
*
758
758
* @return int Returns the number of bytes sent.
759
759
* @throws SocketException If there was a failure.
760
760
*
761
761
*/
762
- public function send (string $ buffer , int $ flags = 0 , int $ length = null ): int
762
+ public function send (string $ buffer , int $ flags = 0 , ? int $ length = null ): int
763
763
{
764
764
if (null === $ length ) {
765
765
$ length = strlen ($ buffer );
0 commit comments