Completed
Push — master ( 5c8cb6...92357d )
by Dmitry
02:05
created

OmnipayResponse::getTime()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 4
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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
use hiqdev\php\merchant\Helper;
14
15
/**
16
 * WebMoney Omnipay Response class.
17
 */
18 View Code Duplication
class OmnipayResponse extends \hiqdev\php\merchant\OmnipayResponse
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
19
{
20
    /**
21
     * Get payment time.
22
     * @return string
23
     */
24
    public function getTime()
25
    {
26
        return Helper::isotime($this->getVar('datetime') . ' Europe/Moscow');
27
    }
28
29
    /**
30
     * Get payer info.
31
     * @return string
32
     */
33
    public function getPayer()
34
    {
35
        return $this->getVar('sender') ?: $this->getVar('email');
36
    }
37
}
38