| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | protected function getInvoke(array $params): string |
||
| 33 | { |
||
| 34 | switch ($params['_type'] ?? 'default') { |
||
| 35 | case 'app': |
||
| 36 | return \Yansongda\Pay\Plugin\Wechat\Pay\App\InvokePrepayV2Plugin::class; |
||
| 37 | |||
| 38 | case 'mini': |
||
| 39 | return \Yansongda\Pay\Plugin\Wechat\Pay\Mini\InvokePrepayV2Plugin::class; |
||
| 40 | |||
| 41 | default: |
||
| 42 | return InvokePrepayV2Plugin::class; |
||
| 43 | } |
||
| 46 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: