Completed
Push — master ( 247cd7...a032e9 )
by Dmitry
02:21
created

OmnipayMerchant::prepareData()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 7
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * Generalization over Omnipay and Payum
4
 *
5
 * @link      https://github.com/hiqdev/php-merchant
6
 * @package   php-merchant
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiqdev\php\merchant\yandex;
12
13
/**
14
 * Yandex Omnipay Merchant class.
15
 */
16
class OmnipayMerchant extends \hiqdev\php\merchant\OmnipayMerchant
17
{
18
    public $requestClass = OmnipayRequest::class;
19
20
    public function getWorker()
21
    {
22
        if ($this->_worker === null) {
23
            $this->_worker = (new \Omnipay\YandexMoney\P2pGateway())->initialize($this->prepareData($this->data));
24
        }
25
26
        return $this->_worker;
27
    }
28
}
29