InteractsWithRedirectionForm   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Importance

Changes 3
Bugs 2 Features 1
Metric Value
eloc 5
c 3
b 2
f 1
dl 0
loc 42
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setRedirectionFormViewPath() 0 3 1
A getRedirectionFormDefaultViewPath() 0 3 1
A getRedirectionFormViewPath() 0 3 1
A setRedirectionFormViewRenderer() 0 3 1
1
<?php
2
3
namespace Shetabit\Multipay\Traits;
4
5
use Shetabit\Multipay\RedirectionForm;
6
7
trait InteractsWithRedirectionForm
8
{
9
    /**
10
     * Set view path of redirection form.
11
     *
12
     * @param string $path
13
     *
14
     * @return void
15
     */
16
    public static function setRedirectionFormViewPath(string $path)
17
    {
18
        RedirectionForm::setViewPath($path);
19
    }
20
21
    /**
22
     * Retrieve default view path of redirection form.
23
     *
24
     * @return string
25
     */
26
    public static function getRedirectionFormDefaultViewPath() : string
27
    {
28
        return RedirectionForm::getDefaultViewPath();
29
    }
30
31
    /**
32
     * Retrieve current view path of redirection form.
33
     *
34
     * @return string
35
     */
36
    public static function getRedirectionFormViewPath() : string
37
    {
38
        return RedirectionForm::getViewPath();
39
    }
40
41
    /**
42
     * Set view renderer
43
     *
44
     * @param callable $renderer
45
     */
46
    public static function setRedirectionFormViewRenderer(callable $renderer)
47
    {
48
        RedirectionForm::setViewRenderer($renderer);
49
    }
50
}
51