| Total Complexity | 2 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class AddPayloadBodyPlugin implements PluginInterface |
||
| 16 | { |
||
| 17 | public function assembly(Rocket $rocket, Closure $next): Rocket |
||
| 18 | { |
||
| 19 | Logger::debug('[Wechat][AddPayloadBodyPlugin] 插件开始装载', ['rocket' => $rocket]); |
||
| 20 | |||
| 21 | $rocket->mergePayload(['_body' => $this->getBody($rocket->getPayload())]); |
||
| 22 | |||
| 23 | Logger::info('[Wechat][AddPayloadBodyPlugin] 插件装载完毕', ['rocket' => $rocket]); |
||
| 24 | |||
| 25 | return $next($rocket); |
||
| 26 | } |
||
| 27 | |||
| 28 | protected function getBody(?Collection $payload): string |
||
| 31 | } |
||
| 32 | } |
||
| 33 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.