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\V3\AddPayloadSignaturePlugin; |
||
14 | use Yansongda\Pay\Plugin\Wechat\V3\Pay\Mini\InvokePlugin; |
||
15 | use Yansongda\Pay\Plugin\Wechat\V3\Pay\Mini\PayPlugin; |
||
16 | use Yansongda\Pay\Plugin\Wechat\V3\VerifySignaturePlugin; |
||
17 | |||
18 | class MiniShortcut implements ShortcutInterface |
||
19 | { |
||
20 | public function getPlugins(array $params): array |
||
21 | { |
||
22 | return [ |
||
0 ignored issues
–
show
|
|||
23 | StartPlugin::class, |
||
24 | PayPlugin::class, |
||
25 | AddPayloadBodyPlugin::class, |
||
26 | AddPayloadSignaturePlugin::class, |
||
27 | AddRadarPlugin::class, |
||
28 | InvokePlugin::class, |
||
29 | VerifySignaturePlugin::class, |
||
30 | ResponsePlugin::class, |
||
31 | ParserPlugin::class, |
||
32 | ]; |
||
33 | } |
||
34 | } |
||
35 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: