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

InvokePrepayPlugin::getAppid()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 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