Completed
Push — master ( 4a584e...bcb0a1 )
by Andrii
08:31
created

AbstractResponse::redirect()

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 1
ccs 0
cts 0
cp 0
nc 1
1
<?php
2
3
/*
4
 * Generalization over Omnipay and Payum
5
 *
6
 * @link      https://github.com/hiqdev/php-merchant
7
 * @package   php-merchant
8
 * @license   BSD-3-Clause
9
 * @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
10
 */
11
12
namespace hiqdev\php\merchant;
13
14
/**
15
 * Abstract Response class.
16
 */
17
abstract class AbstractResponse implements ResponseInterface
18
{
19
    /**
20
     * @var ResponseInterface
21
     */
22
    public $merchant;
23
24
    /**
25
     * @var RequestInterface
26
     */
27
    public $request;
28
29
    /**
30
     * {@inheritdoc}
31
     */
32
    abstract public function redirect();
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    abstract public function isRedirect();
38
39
    /**
40
     * {@inheritdoc}
41
     */
42
    abstract public function isSuccessful();
43
44
    /**
45
     * The instance of payment processing library.
46
     * @return \Omnipay\Common\Message\AbstractResponse|\Payum\Core\Model\Response
47
     */
48
    abstract public function getWorker();
49
50
    public function __call($name, $args)
0 ignored issues
show
Duplication introduced by
This method 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...
51
    {
52
        if (method_exists($this->getWorker(), $name)) {
53
            return call_user_func_array([$this->getWorker(), $name], $args);
54
        }
55
56
        return null;
57
    }
58
59 1
    public function getFee()
60
    {
61 1
        return 0;
62
    }
63
64
    public function getTime()
65
    {
66
        return date('c');
67
    }
68
}
69