1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace Yansongda\Pay\Shortcut\Wechat; |
||
6 | |||
7 | use Yansongda\Artful\Contract\ShortcutInterface; |
||
8 | use Yansongda\Artful\Plugin\AddPayloadBodyPlugin; |
||
9 | use Yansongda\Artful\Plugin\ParserPlugin; |
||
10 | use Yansongda\Pay\Plugin\Wechat\AddRadarPlugin; |
||
11 | use Yansongda\Pay\Plugin\Wechat\ResponsePlugin; |
||
12 | use Yansongda\Pay\Plugin\Wechat\StartPlugin; |
||
13 | use Yansongda\Pay\Plugin\Wechat\V2\AddPayloadSignaturePlugin; |
||
14 | use Yansongda\Pay\Plugin\Wechat\V2\Pay\Redpack\SendPlugin; |
||
15 | use Yansongda\Pay\Plugin\Wechat\V2\VerifySignaturePlugin; |
||
16 | |||
17 | class RedpackShortcut implements ShortcutInterface |
||
18 | { |
||
19 | public function getPlugins(array $params): array |
||
20 | { |
||
21 | return [ |
||
0 ignored issues
–
show
|
|||
22 | StartPlugin::class, |
||
23 | SendPlugin::class, |
||
24 | AddPayloadSignaturePlugin::class, |
||
25 | AddPayloadBodyPlugin::class, |
||
26 | AddRadarPlugin::class, |
||
27 | VerifySignaturePlugin::class, |
||
28 | ResponsePlugin::class, |
||
29 | ParserPlugin::class, |
||
30 | ]; |
||
31 | } |
||
32 | } |
||
33 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: