Completed
Push — master ( 2a0773...f82564 )
by Songda
27s queued 13s
created

InvokePrepayPlugin   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
eloc 3
c 2
b 0
f 0
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getAppid() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yansongda\Pay\Plugin\Wechat\Pay\Mini;
6
7
use Yansongda\Pay\Rocket;
8
9
class InvokePrepayPlugin extends \Yansongda\Pay\Plugin\Wechat\Pay\Common\InvokePrepayPlugin
10
{
11
    /**
12
     * @throws \Yansongda\Pay\Exception\ContainerDependencyException
13
     * @throws \Yansongda\Pay\Exception\ContainerException
14
     * @throws \Yansongda\Pay\Exception\ServiceNotFoundException
15
     */
16
    protected function getAppid(Rocket $rocket): string
17
    {
18
        $config = get_wechat_config($rocket->getParams());
19
20
        return $config->get('mini_app_id', '');
21
    }
22
}
23