Passed
Branch master (fbf0a6)
by Volodymyr
04:04
created

RefererProvider::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Copyright (c) 2019. Volodymyr Hryvinskyi.  All rights reserved.
4
 * @author: <mailto:[email protected]>
5
 * @github: <https://github.com/hryvinskyi>
6
 */
7
8
declare(strict_types=1);
9
10
namespace Hryvinskyi\InvisibleCaptcha\Model\Provider\Failure\RedirectUrl;
11
12
use Hryvinskyi\InvisibleCaptcha\Model\Provider\Failure\RedirectUrlInterface;
13
use Magento\Framework\App\Response\RedirectInterface;
14
15
class RefererProvider implements RedirectUrlInterface
16
{
17
    /**
18
     * @var RedirectInterface
19
     */
20
    private $redirect;
21
22
    /**
23
     * RefererProvider constructor.
24
     *
25
     * @param RedirectInterface $redirect
26
     */
27
    public function __construct(
28
        RedirectInterface $redirect
29
    ) {
30
        $this->redirect = $redirect;
31
    }
32
33
    /**
34
     * @inheritDoc
35
     */
36
    public function getRedirectUrl(): string
37
    {
38
        return $this->redirect->getRedirectUrl();
39
    }
40
}