Completed
Push — master ( 8a354a...1383d1 )
by Dmitry
12:48
created

PaymentMethodsProvider::getPaymentMethods()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
4
namespace hipanel\modules\finance\providers;
5
6
7
use hiqdev\yii2\cart\PaymentMethodsProviderInterface;
8
use Yii;
9
10
/**
11
 * Class PaymentMethodsProvider
12
 * @package hipanel\modules\finance\providers
13
 */
14
class PaymentMethodsProvider implements PaymentMethodsProviderInterface
15
{
16
    /**
17
     * @inheritDoc
18
     */
19
    public function getPaymentMethods()
20
    {
21
        $merchants = Yii::$app->getModule('merchant')->getPurchaseRequestCollection(
22
            new \hiqdev\yii2\merchant\models\DepositRequest(['amount' => 5])
23
        )->getItems();
24
25
        return Yii::$app->getView()->renderFile(dirname(__DIR__) . '/views/cart/payment-methods.php', [
26
            'merchants' => $merchants,
27
        ]);
28
    }
29
}
30