Skip to content

Commit 2103f4d

Browse files
committed
优化
1 parent 1d35ec0 commit 2103f4d

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
"require": {
44
"php": ">=7.2",
55
"ext-json": "*",
6-
"guzzlehttp/guzzle": "^6.3",
7-
"mockery/mockery": "^1.2"
6+
"guzzlehttp/guzzle": "^6.3"
87
},
98
"require-dev": {
109
"phpunit/phpunit": "^7.0.0",
11-
"friendsofphp/php-cs-fixer": "^2.9"
10+
"friendsofphp/php-cs-fixer": "^2.9",
11+
"mockery/mockery": "^1.2"
1212
},
1313
"autoload": {
1414
"psr-4": {

src/AbstractRobot.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,15 @@ public function send(AbstractMessage $message)
2727
{
2828
$response = $this->client->request('POST', $this->getWebhook(), [
2929
'json' => $message->format(),
30-
]);
30+
] + $this->getOptions());
3131
return $this->afterSend($response);
3232
}
3333

34+
protected function getOptions()
35+
{
36+
return [];
37+
}
38+
3439
protected function afterSend(ResponseInterface $response): array
3540
{
3641
return json_decode($response->getBody()->getContents(), true);

0 commit comments

Comments
 (0)