Skip to content

Commit 0a5ce89

Browse files
calchenStyleCIBot
authored andcommitted
Apply fixes from StyleCI
1 parent 271af20 commit 0a5ce89

23 files changed

+70
-82
lines changed

src/DingtalkRobot.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ public function __construct()
6161
/**
6262
* 指定机器人名称,默认为 default.
6363
*
64-
* @param string $name
65-
*
64+
* @param string $name
6665
* @return $this
66+
*
6767
* @throws Exception
6868
*/
6969
public function robot($name = 'default'): self
@@ -126,9 +126,9 @@ public function robot($name = 'default'): self
126126
/**
127127
* 将创建好的 message 对象保存到当前对象中以便后续发送
128128
*
129-
* @param Message $message
130-
*
129+
* @param Message $message
131130
* @return $this
131+
*
132132
* @throws Exception
133133
*/
134134
public function setMessage(Message $message): self
@@ -178,6 +178,7 @@ private function getHttpClient(): ClientInterface
178178
* 发起请求,返回的内容与直接调用钉钉接口返回的内容一致.
179179
*
180180
* @return array
181+
*
181182
* @throws Exception
182183
*/
183184
public function send(): array

src/DingtalkRobotChannel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ class DingtalkRobotChannel
1717
/**
1818
* Send the given notification.
1919
*
20-
* @param $notifiable
21-
* @param Notification $notification
20+
* @param $notifiable
21+
* @param Notification $notification
2222
*
2323
* @throws Exception
2424
*/

src/Exceptions/Exception.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ class Exception extends \Exception
1414
/**
1515
* 重写构造方法,直接根据 code 取错误消息.
1616
*
17-
* @param string $message
18-
* @param int $code
19-
* @param Throwable|null $previous
17+
* @param string $message
18+
* @param int $code
19+
* @param Throwable|null $previous
2020
*/
2121
public function __construct($message = '', $code = 0, Throwable $previous = null)
2222
{

src/Message/ActionCardMessage.php

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ class ActionCardMessage extends Message
3131
/**
3232
* ActionCardMessage constructor.
3333
*
34-
* @param string|null $title 首屏会话透出的展示内容
35-
* @param string|null $text markdown 格式的消息
36-
* @param int|null $hideAvatar 0-按钮竖直排列,1-按钮横向排列
37-
* @param int|null $btnOrientation 0-正常发消息者头像,1-隐藏发消息者头像
34+
* @param string|null $title 首屏会话透出的展示内容
35+
* @param string|null $text markdown 格式的消息
36+
* @param int|null $hideAvatar 0-按钮竖直排列,1-按钮横向排列
37+
* @param int|null $btnOrientation 0-正常发消息者头像,1-隐藏发消息者头像
3838
*
3939
* @throws InvalidConfigurationException
4040
*/
@@ -48,12 +48,12 @@ public function __construct(string $title = null, string $text = null, $hideAvat
4848
/**
4949
* ActionCard 的整体跳转和独立跳转两种类型中 title text hideAvatar btnOrientation 都是共同拥有的.
5050
*
51-
* @param string $title 首屏会话透出的展示内容
52-
* @param string $text markdown 格式的消息
53-
* @param int|null $hideAvatar 0-按钮竖直排列,1-按钮横向排列
54-
* @param int|null $btnOrientation 0-正常发消息者头像,1-隐藏发消息者头像
55-
*
51+
* @param string $title 首屏会话透出的展示内容
52+
* @param string $text markdown 格式的消息
53+
* @param int|null $hideAvatar 0-按钮竖直排列,1-按钮横向排列
54+
* @param int|null $btnOrientation 0-正常发消息者头像,1-隐藏发消息者头像
5655
* @return ActionCardMessage
56+
*
5757
* @throws InvalidConfigurationException
5858
*/
5959
public function setMessage(string $title, string $text, $hideAvatar = null, $btnOrientation = null): self
@@ -85,10 +85,9 @@ public function setMessage(string $title, string $text, $hideAvatar = null, $btn
8585
/**
8686
* 设置整体跳转类型参数,与独立跳转互斥.
8787
*
88-
* @param string $singleTitle 单个按钮的方案。(设置此项和singleURL后btns无效。)
89-
* @param string $singleUrl 点击singleTitle按钮触发的URL
90-
* @param bool $pcSlide 链接是否在 PC 端侧栏打开,true 在 PC 端侧栏打开;false 在系统默认浏览器
91-
*
88+
* @param string $singleTitle 单个按钮的方案。(设置此项和singleURL后btns无效。)
89+
* @param string $singleUrl 点击singleTitle按钮触发的URL
90+
* @param bool $pcSlide 链接是否在 PC 端侧栏打开,true 在 PC 端侧栏打开;false 在系统默认浏览器
9291
* @return $this
9392
*/
9493
public function setSingle(string $singleTitle, string $singleUrl, bool $pcSlide = true): self
@@ -103,10 +102,9 @@ public function setSingle(string $singleTitle, string $singleUrl, bool $pcSlide
103102
/**
104103
* 设置独立跳转类型按钮参数,可设置多个,与整体跳转互斥.
105104
*
106-
* @param string $title 按钮方案
107-
* @param string $actionUrl 点击按钮触发的URL
108-
* @param bool $pcSlide 链接是否在 PC 端侧栏打开,true 在 PC 端侧栏打开;false 在系统默认浏览器
109-
*
105+
* @param string $title 按钮方案
106+
* @param string $actionUrl 点击按钮触发的URL
107+
* @param bool $pcSlide 链接是否在 PC 端侧栏打开,true 在 PC 端侧栏打开;false 在系统默认浏览器
110108
* @return ActionCardMessage
111109
*/
112110
public function addButton(string $title, string $actionUrl, bool $pcSlide = true): self

src/Message/AtTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ trait AtTrait
1515
/**
1616
* 通过手机号码指定“被@人列表”.
1717
*
18-
* @param string|array $mobiles 被@人的手机号(在text内容里要有@手机号)
19-
*
18+
* @param string|array $mobiles 被@人的手机号(在text内容里要有@手机号)
2019
* @return Message
20+
*
2121
* @throws InvalidArgumentException
2222
*/
2323
public function at($mobiles): self

src/Message/FeedCardMessage.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,10 @@ public function setMessage()
3030
/**
3131
* 增加链接.
3232
*
33-
* @param string $title 单条信息文本
34-
* @param string $messageUrl 点击单条信息到跳转链接
35-
* @param string $picUrl 单条信息后面图片的URL
36-
* @param bool $pcSlide 链接是否在 PC 端侧栏打开,true 在 PC 端侧栏打开;false 在系统默认浏览器
37-
*
33+
* @param string $title 单条信息文本
34+
* @param string $messageUrl 点击单条信息到跳转链接
35+
* @param string $picUrl 单条信息后面图片的URL
36+
* @param bool $pcSlide 链接是否在 PC 端侧栏打开,true 在 PC 端侧栏打开;false 在系统默认浏览器
3837
* @return FeedCardMessage
3938
*/
4039
public function addLink(string $title, string $messageUrl, string $picUrl, bool $pcSlide = true): self

src/Message/LinkMessage.php

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ class LinkMessage extends Message
1212
/**
1313
* LinkMessage constructor.
1414
*
15-
* @param string|null $title 消息标题
16-
* @param string|null $text 消息内容。如果太长只会部分展示
17-
* @param string|null $messageUrl 点击消息跳转的 URL
18-
* @param string $picUrl 图片 URL
19-
* @param bool $pcSlide 链接是否在 PC 端侧栏打开,true 在 PC 端侧栏打开;false 在系统默认浏览器
15+
* @param string|null $title 消息标题
16+
* @param string|null $text 消息内容。如果太长只会部分展示
17+
* @param string|null $messageUrl 点击消息跳转的 URL
18+
* @param string $picUrl 图片 URL
19+
* @param bool $pcSlide 链接是否在 PC 端侧栏打开,true 在 PC 端侧栏打开;false 在系统默认浏览器
2020
*/
2121
public function __construct(
2222
string $title = null,
@@ -31,12 +31,11 @@ public function __construct(
3131
}
3232

3333
/**
34-
* @param string $title 消息标题
35-
* @param string $text 消息内容。如果太长只会部分展示
36-
* @param string $messageUrl 点击消息跳转的 URL
37-
* @param string $picUrl 图片 URL
38-
* @param bool $pcSlide 链接是否在 PC 端侧栏打开,true 在 PC 端侧栏打开;false 在系统默认浏览器
39-
*
34+
* @param string $title 消息标题
35+
* @param string $text 消息内容。如果太长只会部分展示
36+
* @param string $messageUrl 点击消息跳转的 URL
37+
* @param string $picUrl 图片 URL
38+
* @param bool $pcSlide 链接是否在 PC 端侧栏打开,true 在 PC 端侧栏打开;false 在系统默认浏览器
4039
* @return LinkMessage
4140
*/
4241
public function setMessage(

src/Message/MarkdownMessage.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ class MarkdownMessage extends Message
1414
/**
1515
* MarkdownMessage constructor.
1616
*
17-
* @param string|null $title 首屏会话透出的展示内容
18-
* @param string|null $text markdown 格式的消息
17+
* @param string|null $title 首屏会话透出的展示内容
18+
* @param string|null $text markdown 格式的消息
1919
*/
2020
public function __construct(string $title = null, string $text = null)
2121
{
@@ -25,9 +25,8 @@ public function __construct(string $title = null, string $text = null)
2525
}
2626

2727
/**
28-
* @param string $title 首屏会话透出的展示内容
29-
* @param string $text markdown 格式的消息
30-
*
28+
* @param string $title 首屏会话透出的展示内容
29+
* @param string $text markdown 格式的消息
3130
* @return MarkdownMessage
3231
*/
3332
public function setMessage(string $title, string $text): self

src/Message/Message.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ public function getMessage(): array
3131
/**
3232
* 设置接受消息的机器人名称.
3333
*
34-
* @param string $robot
35-
*
34+
* @param string $robot
3635
* @return Message
3736
*/
3837
public function setRobot(string $robot): self
@@ -57,9 +56,8 @@ public function getRobot(): string
5756
*
5857
* @link https://ding-doc.dingtalk.com/doc#/serverapi2/iat9q8/e300ae98
5958
*
60-
* @param string $url
61-
* @param bool $pcSlide
62-
*
59+
* @param string $url
60+
* @param bool $pcSlide
6361
* @return string
6462
*/
6563
public function getFinalUrl(string $url, bool $pcSlide = true): string

src/Message/TextMessage.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class TextMessage extends Message
1414
/**
1515
* TextMessage constructor.
1616
*
17-
* @param string|null $content 消息内容
17+
* @param string|null $content 消息内容
1818
*/
1919
public function __construct(string $content = null)
2020
{
@@ -24,8 +24,7 @@ public function __construct(string $content = null)
2424
}
2525

2626
/**
27-
* @param string $content 消息内容
28-
*
27+
* @param string $content 消息内容
2928
* @return TextMessage
3029
*/
3130
public function setMessage(string $content): self

0 commit comments

Comments
 (0)