diff --git a/WeChat/Contracts/Tools.php b/WeChat/Contracts/Tools.php index 90b4a43..a31bb8e 100644 --- a/WeChat/Contracts/Tools.php +++ b/WeChat/Contracts/Tools.php @@ -99,7 +99,7 @@ class Tools /** * 创建CURL文件对象 - * @param $filename + * @param mixed $filename * @param string $mimetype * @param string $postname * @return \CURLFile|string @@ -168,7 +168,7 @@ class Tools /** * 解析XML文本内容 * @param string $xml - * @return boolean|mixed + * @return array|false */ public static function xml3arr($xml) { @@ -354,7 +354,7 @@ class Tools private static function _buildHttpData($data, $build = true) { if (!is_array($data)) return $data; - foreach ($data as $key => $value) if (is_object($value) && $value instanceof \CURLFile) { + foreach ($data as $key => $value) if ($value instanceof \CURLFile) { $build = false; } elseif (is_object($value) && isset($value->datatype) && $value->datatype === 'MY_CURL_FILE') { $build = false; diff --git a/WeChat/Media.php b/WeChat/Media.php index cbfde37..3ae1390 100644 --- a/WeChat/Media.php +++ b/WeChat/Media.php @@ -14,8 +14,8 @@ namespace WeChat; -use WeChat\Contracts\Tools; use WeChat\Contracts\BasicWeChat; +use WeChat\Contracts\Tools; use WeChat\Exceptions\InvalidResponseException; /** @@ -99,7 +99,7 @@ class Media extends BasicWeChat /** * 上传图文消息内的图片获取URL - * @param string $filename + * @param mixed $filename * @return array * @throws Exceptions\LocalCacheException * @throws InvalidResponseException @@ -113,7 +113,7 @@ class Media extends BasicWeChat /** * 新增其他类型永久素材 - * @param string $filename 文件名称 + * @param mixed $filename 文件名称 * @param string $type 媒体文件类型(image|voice|video|thumb) * @param array $description 包含素材的描述信息 * @return array