From 7eeaef4c3b7a61826cd378e249993790cbdf5435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 31 Mar 2020 16:15:01 +0800 Subject: [PATCH] add clear --- wchat/common/Result.php | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/wchat/common/Result.php b/wchat/common/Result.php index f648b4f..9e2f36f 100644 --- a/wchat/common/Result.php +++ b/wchat/common/Result.php @@ -14,11 +14,14 @@ namespace wchat\common; */ class Result { - public $code; - public $message; - public $count = 0; - public $data; - public $header; + public string $code; + public string $message; + public int $count = 0; + public array $data; + public array $header; + private int $startTime; + private int $requestTime; + private string $runTime; public function __construct(array $data) { @@ -67,6 +70,9 @@ class Result return $this; } + /** + * @return array + */ public function getTime() { return [ @@ -91,7 +97,9 @@ class Result return $this; } - + /** + * @return bool + */ public function isResultsOK() { if (!is_numeric($this->code)) {