| Conditions | 3 |
| Paths | 3 |
| Total Lines | 9 |
| 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']) { |
||
| 35 | case 'app': |
||
| 36 | return \Yansongda\Pay\Plugin\Wechat\Pay\App\InvokePrepayV2Plugin::class; |
||
| 37 | case 'mini': |
||
| 38 | return \Yansongda\Pay\Plugin\Wechat\Pay\Mini\InvokePrepayV2Plugin::class; |
||
| 39 | default: |
||
| 40 | return InvokePrepayV2Plugin::class; |
||
| 41 | } |
||
| 44 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: