php: $metadata at API should be optional

pull/3181/head
Stanley Cheung 9 years ago
parent 03e170eaf0
commit 3ff5ceaae2
  1. 2
      src/php/lib/Grpc/BidiStreamingCall.php
  2. 2
      src/php/lib/Grpc/ClientStreamingCall.php

@ -42,7 +42,7 @@ class BidiStreamingCall extends AbstractCall {
* Start the call * Start the call
* @param array $metadata Metadata to send with the call, if applicable * @param array $metadata Metadata to send with the call, if applicable
*/ */
public function start($metadata) { public function start($metadata = array()) {
$this->call->startBatch([OP_SEND_INITIAL_METADATA => $metadata]); $this->call->startBatch([OP_SEND_INITIAL_METADATA => $metadata]);
} }

@ -42,7 +42,7 @@ class ClientStreamingCall extends AbstractCall {
* Start the call. * Start the call.
* @param array $metadata Metadata to send with the call, if applicable * @param array $metadata Metadata to send with the call, if applicable
*/ */
public function start($metadata) { public function start($metadata = array()) {
$this->call->startBatch([OP_SEND_INITIAL_METADATA => $metadata]); $this->call->startBatch([OP_SEND_INITIAL_METADATA => $metadata]);
} }

Loading…
Cancel
Save