Skip to content

Commit 70ae196

Browse files
committed
注释
1 parent 89474f8 commit 70ae196

File tree

7 files changed

+28
-1
lines changed

7 files changed

+28
-1
lines changed

src/AccessToken.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public function getHttpClient()
6767
* @param bool $forceRefresh
6868
*
6969
* @return string
70+
* @throws Exception
7071
*/
7172
public function getToken($forceRefresh = false)
7273
{

src/Api.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ public function post($url, $params = [])
9191
* @param string|array $params
9292
*
9393
* @return array
94+
* @throws Exception
9495
*/
9596
public function json($url, $params = [])
9697
{

src/Wechat.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class Wechat extends Component
5858
* Initializes the object.
5959
* This method is invoked at the end of the constructor after the object is initialized with the
6060
* given configuration.
61+
* @throws InvalidConfigException
6162
*/
6263
public function init()
6364
{
@@ -75,6 +76,7 @@ public function init()
7576

7677
/**
7778
* @return object|AccessToken
79+
* @throws InvalidConfigException
7880
*/
7981
public function getAccessToken()
8082
{
@@ -85,6 +87,7 @@ public function getAccessToken()
8587

8688
/**
8789
* @return object|OAuth
90+
* @throws InvalidConfigException
8891
*/
8992
public function getOauth()
9093
{
@@ -95,6 +98,7 @@ public function getOauth()
9598

9699
/**
97100
* @return object|Js
101+
* @throws InvalidConfigException
98102
*/
99103
public function getJs()
100104
{
@@ -105,6 +109,7 @@ public function getJs()
105109

106110
/**
107111
* @return object|Notice
112+
* @throws InvalidConfigException
108113
*/
109114
public function getNotice()
110115
{
@@ -115,6 +120,7 @@ public function getNotice()
115120

116121
/**
117122
* @return object|Url
123+
* @throws InvalidConfigException
118124
*/
119125
public function getUrl()
120126
{
@@ -125,6 +131,7 @@ public function getUrl()
125131

126132
/**
127133
* @return object|Menu
134+
* @throws InvalidConfigException
128135
*/
129136
public function getMenu(){
130137
return Yii::createObject([
@@ -134,6 +141,7 @@ public function getMenu(){
134141

135142
/**
136143
* @return object|QRCode
144+
* @throws InvalidConfigException
137145
*/
138146
public function getQrcode(){
139147
return Yii::createObject([
@@ -143,6 +151,7 @@ public function getQrcode(){
143151

144152
/**
145153
* @return object|Material
154+
* @throws InvalidConfigException
146155
*/
147156
public function getMaterial(){
148157
return Yii::createObject([
@@ -152,6 +161,7 @@ public function getMaterial(){
152161

153162
/**
154163
* @return object|Temporary
164+
* @throws InvalidConfigException
155165
*/
156166
public function getMaterialTemporary(){
157167
return Yii::createObject([

src/menu/Menu.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class Menu extends Api
2222
/**
2323
* Get all menus.
2424
* @return array
25+
* @throws \yii\httpclient\Exception
2526
*/
2627
public function all()
2728
{
@@ -31,6 +32,7 @@ public function all()
3132
/**
3233
* Get current menus.
3334
* @return array
35+
* @throws \yii\httpclient\Exception
3436
*/
3537
public function current()
3638
{
@@ -42,6 +44,7 @@ public function current()
4244
* @param array $buttons
4345
* @param array $matchRule
4446
* @return array
47+
* @throws \yii\httpclient\Exception
4548
*/
4649
public function add(array $buttons, array $matchRule = [])
4750
{
@@ -58,6 +61,7 @@ public function add(array $buttons, array $matchRule = [])
5861
* Destroy menu.
5962
* @param int $menuId
6063
* @return array
64+
* @throws \yii\httpclient\Exception
6165
*/
6266
public function destroy($menuId = null)
6367
{
@@ -71,6 +75,7 @@ public function destroy($menuId = null)
7175
* Test conditional menu.
7276
* @param string $userId
7377
* @return array
78+
* @throws \yii\httpclient\Exception
7479
*/
7580
public function test($userId)
7681
{

src/notice/Notice.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ public function defaultColor($color)
8585
* @param int $industryOne 公众号模板消息所属行业编号
8686
* @param int $industryTwo 公众号模板消息所属行业编号
8787
* @return array
88+
* @throws \yii\httpclient\Exception
8889
*/
8990
public function setIndustry($industryOne, $industryTwo)
9091
{
@@ -98,6 +99,7 @@ public function setIndustry($industryOne, $industryTwo)
9899
/**
99100
* 获取设置的行业信息
100101
* @return array
102+
* @throws \yii\httpclient\Exception
101103
*/
102104
public function getIndustry()
103105
{
@@ -109,6 +111,7 @@ public function getIndustry()
109111
*
110112
* @param string $shortId
111113
* @return array
114+
* @throws \yii\httpclient\Exception
112115
*/
113116
public function addTemplate($shortId)
114117
{
@@ -120,6 +123,7 @@ public function addTemplate($shortId)
120123
* 获取模板列表
121124
*
122125
* @return array
126+
* @throws \yii\httpclient\Exception
123127
*/
124128
public function getPrivateTemplates()
125129
{
@@ -132,6 +136,7 @@ public function getPrivateTemplates()
132136
* @param string $templateId
133137
*
134138
* @return array
139+
* @throws \yii\httpclient\Exception
135140
*/
136141
public function deletePrivateTemplate($templateId)
137142
{
@@ -142,9 +147,9 @@ public function deletePrivateTemplate($templateId)
142147
/**
143148
* 发送模板消息
144149
*
145-
* @param $data
146150
* @param array $data
147151
* @return array
152+
* @throws \yii\httpclient\Exception
148153
*/
149154
public function send(array $data = [])
150155
{

src/oauth/AuthAction.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ protected function defaultCancelUrl()
144144

145145
/**
146146
* Runs the action.
147+
* @throws Exception
147148
*/
148149
public function run()
149150
{

src/qrcode/QRCode.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class QRCode extends Api
3131
* @param int $sceneValue
3232
*
3333
* @return array
34+
* @throws \yii\httpclient\Exception
3435
*/
3536
public function forever($sceneValue)
3637
{
@@ -54,6 +55,7 @@ public function forever($sceneValue)
5455
* @param null $expireSeconds
5556
*
5657
* @return array
58+
* @throws \yii\httpclient\Exception
5759
*/
5860
public function temporary($sceneId, $expireSeconds = null)
5961
{
@@ -76,6 +78,7 @@ public function temporary($sceneId, $expireSeconds = null)
7678
* }
7779
*
7880
* @return array
81+
* @throws \yii\httpclient\Exception
7982
*/
8083
public function card($card)
8184
{
@@ -102,6 +105,7 @@ public function url($ticket)
102105
* @param bool $temporary
103106
* @param int $expireSeconds
104107
* @return array
108+
* @throws \yii\httpclient\Exception
105109
*/
106110
protected function create($actionName, $actionInfo, $temporary = true, $expireSeconds = null)
107111
{

0 commit comments

Comments
 (0)