src/mako/redis/Connection.php
public function write(string $data): int
	{
		$totalBytesWritten = 0;

		$bytesLeft = strlen($data);

		do
		{
			$totalBytesWritten += $bytesWritten = fwrite($this->connection, $data);

			if($bytesWritten === false || $bytesWritten === 0)
			{
				throw new RedisException('Failed to write data to the server.');
			}

			$bytesLeft -= $bytesWritten;

			$data = substr($data, $bytesWritten);
		}
		while($bytesLeft > 0);

		return $totalBytesWritten;
	}
public function write(string $data): int
	{
		$totalBytesWritten = 0;

		$bytesLeft = strlen($data);

		do
		{
			$totalBytesWritten += $bytesWritten = fwrite($this->connection, $data);

			if($bytesWritten === false || $bytesWritten === 0)
			{
				throw new RedisException('Failed to write data to the server.');
			}

			$bytesLeft -= $bytesWritten;

			$data = substr($data, $bytesWritten);
		}
		while($bytesLeft > 0);

		return $totalBytesWritten;
	}
public function write ( string $ data ) : int { $ totalBytesWritten = 0 ; $ bytesLeft = strlen ( $ data ) ; do { $ totalBytesWritten += $ bytesWritten = fwrite ( $ this -> connection , $ data ) ; if ( $ bytesWritten === false || $ bytesWritten === 0 ) { throw new RedisException ( 'Failed to write data to the server.' ) ; } $ bytesLeft -= $ bytesWritten ; $ data = substr ( $ data , $ bytesWritten ) ; } while ( $ bytesLeft > 0 ) ; return $ totalBytesWritten ; }
Writes data to the server.

@param  string                     $data Data to write
@throws \mako\redis\RedisException
@return int
Writes data to the server .