Collection::createItem()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 2
1
<?php
2
/**
3
 * Yii2 extension for payment processing with Omnipay, Payum and more later.
4
 *
5
 * @link      https://github.com/hiqdev/yii2-merchant
6
 * @package   yii2-merchant
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiqdev\yii2\merchant;
12
13
use hiqdev\yii2\merchant\models\DepositRequest;
14
15
/**
16
 * Merchants Collection.
17
 */
18
class Collection extends \hiqdev\yii2\collection\Manager
19
{
20
    /**
21
     * @var DepositRequest
22
     */
23
    public $depositRequest = [];
24
25
    /**
26
     * @var Module
27
     */
28
    public $module;
29
30
    /**
31
     * {@inheritdoc}
32
     */
33
    protected function createItem($id, array $config = [])
34
    {
35
        return $this->module->createMerchant($id, $config);
36
    }
37
}
38