Skip to content

Commit 0e17c20

Browse files
committed
完善注释
1 parent ae385dc commit 0e17c20

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

src/js/Js.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public function getConfigArray(array $APIs, $debug = false, $beta = false)
6969
* @param bool $forceRefresh
7070
*
7171
* @return string
72+
* @throws \yii\httpclient\Exception
7273
*/
7374
public function ticket($forceRefresh = false)
7475
{
@@ -89,6 +90,7 @@ public function ticket($forceRefresh = false)
8990
* @param int $timestamp
9091
*
9192
* @return array
93+
* @throws \yii\httpclient\Exception
9294
*/
9395
public function signature($url = null, $nonce = null, $timestamp = null)
9496
{

src/material/Material.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class Material extends Api
3333
* Upload image.
3434
* @param string $path
3535
* @return mixed
36+
* @throws \yii\httpclient\Exception
3637
*/
3738
public function uploadImage($path)
3839
{
@@ -43,6 +44,7 @@ public function uploadImage($path)
4344
* Upload voice.
4445
* @param string $path
4546
* @return mixed
47+
* @throws \yii\httpclient\Exception
4648
*/
4749
public function uploadVoice($path)
4850
{
@@ -53,6 +55,7 @@ public function uploadVoice($path)
5355
* Upload thumb.
5456
* @param string $path
5557
* @return mixed
58+
* @throws \yii\httpclient\Exception
5659
*/
5760
public function uploadThumb($path)
5861
{
@@ -65,6 +68,7 @@ public function uploadThumb($path)
6568
* @param string $title
6669
* @param string $description
6770
* @return mixed
71+
* @throws \yii\httpclient\Exception
6872
*/
6973
public function uploadVideo($path, $title, $description)
7074
{
@@ -83,6 +87,7 @@ public function uploadVideo($path, $title, $description)
8387
* Upload articles.
8488
* @param array|Article $articles
8589
* @return array
90+
* @throws \yii\httpclient\Exception
8691
*/
8792
public function uploadArticle($articles)
8893
{
@@ -108,6 +113,7 @@ public function uploadArticle($articles)
108113
* @param string $article
109114
* @param int $index
110115
* @return array
116+
* @throws \yii\httpclient\Exception
111117
*/
112118
public function updateArticle($mediaId, $article, $index = 0)
113119
{
@@ -123,6 +129,7 @@ public function updateArticle($mediaId, $article, $index = 0)
123129
* Upload image for article.
124130
* @param string $path
125131
* @return mixed
132+
* @throws \yii\httpclient\Exception
126133
*/
127134
public function uploadArticleImage($path)
128135
{
@@ -171,6 +178,7 @@ public function get1($mediaId)
171178
* Delete material by media ID.
172179
* @param string $mediaId
173180
* @return array
181+
* @throws \yii\httpclient\Exception
174182
*/
175183
public function delete($mediaId)
176184
{
@@ -199,6 +207,7 @@ public function delete($mediaId)
199207
* @param int $count
200208
*
201209
* @return array
210+
* @throws \yii\httpclient\Exception
202211
*/
203212
public function lists($type, $offset = 0, $count = 20)
204213
{
@@ -216,6 +225,7 @@ public function lists($type, $offset = 0, $count = 20)
216225
* @param string $path
217226
* @param array $form
218227
* @return mixed
228+
* @throws \yii\httpclient\Exception
219229
*/
220230
protected function uploadMedia($type, $path, array $form = [])
221231
{
@@ -230,6 +240,7 @@ protected function uploadMedia($type, $path, array $form = [])
230240
* Get stats of materials.
231241
*
232242
* @return array
243+
* @throws \yii\httpclient\Exception
233244
*/
234245
public function stats()
235246
{

src/oauth/OAuth.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ protected function initUserAttributes()
180180
* Gets new auth token to replace expired one.
181181
* @param OAuthToken $token expired auth token.
182182
* @return OAuthToken new auth token.
183+
* @throws \yii\authclient\InvalidResponseException
183184
*/
184185
public function refreshAccessToken(OAuthToken $token)
185186
{

src/url/Url.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class Url extends Api
2525
*
2626
* @param string $url
2727
* @return array
28+
* @throws \yii\httpclient\Exception
2829
*/
2930
public function shorten($url)
3031
{

0 commit comments

Comments
 (0)