| @@ -16,9 +16,9 @@ | ||
| 16 | 16 | * See the License for the specific language governing permissions and |
| 17 | 17 | * limitations under the License. |
| 18 | 18 | * |
| 19 | 19 | */ |
| 20 | -namespace Dudlewebs\WPMCS\Grpc; | |
| 20 | +namespace Dudlewebs\WPMCS\GCP\Grpc; | |
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * This is an experimental and incomplete implementation of gRPC server |
| 24 | 24 | * for PHP. APIs are _definitely_ going to be changed. |
| @@ -30,9 +30,9 @@ | ||
| 30 | 30 | * @package Grpc |
| 31 | 31 | */ |
| 32 | 32 | class Status |
| 33 | 33 | { |
| 34 | - public static function status(int $code, string $details, array $metadata = null): array | |
| 34 | + public static function status(int $code, string $details, ?array $metadata = null) : array | |
| 35 | 35 | { |
| 36 | 36 | $status = ['code' => $code, 'details' => $details]; |
| 37 | 37 | if ($metadata) { |
| 38 | 38 | $status['metadata'] = $metadata; |
| @@ -38,13 +38,13 @@ | ||
| 38 | 38 | $status['metadata'] = $metadata; |
| 39 | 39 | } |
| 40 | 40 | return $status; |
| 41 | 41 | } |
| 42 | - public static function ok(array $metadata = null): array | |
| 42 | + public static function ok(?array $metadata = null) : array | |
| 43 | 43 | { |
| 44 | 44 | return Status::status(STATUS_OK, 'OK', $metadata); |
| 45 | 45 | } |
| 46 | - public static function unimplemented(): array | |
| 46 | + public static function unimplemented() : array | |
| 47 | 47 | { |
| 48 | 48 | return Status::status(STATUS_UNIMPLEMENTED, 'UNIMPLEMENTED'); |
| 49 | 49 | } |
| 50 | 50 | } |