Passed
Push — master ( a6aefd...a6f236 )
by mahdi
02:46
created

InteractsWithRedirectionForm   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setRedirectionFormViewPath() 0 3 1
A getRedirectionFormDefaultViewPath() 0 3 1
A getRedirectionFormViewPath() 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
     * @param string $path
25
     *
26
     * @return void
27
     */
28
    public static function getRedirectionFormDefaultViewPath(string $path) : string
0 ignored issues
show
Unused Code introduced by
The parameter $path is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

28
    public static function getRedirectionFormDefaultViewPath(/** @scrutinizer ignore-unused */ string $path) : string

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
29
    {
30
        return RedirectionForm::getDefaultViewPath();
0 ignored issues
show
Bug Best Practice introduced by
The expression return Shetabit\Multipay...m::getDefaultViewPath() returns the type string which is incompatible with the documented return type void.
Loading history...
31
    }
32
33
    /**
34
     * Retrieve current view path of redirection form.
35
     *
36
     * @param string $path
37
     *
38
     * @return void
39
     */
40
    public static function getRedirectionFormViewPath(string $path) : string
0 ignored issues
show
Unused Code introduced by
The parameter $path is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

40
    public static function getRedirectionFormViewPath(/** @scrutinizer ignore-unused */ string $path) : string

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
41
    {
42
        return RedirectionForm::getViewPath();
0 ignored issues
show
Bug Best Practice introduced by
The expression return Shetabit\Multipay...tionForm::getViewPath() returns the type string which is incompatible with the documented return type void.
Loading history...
43
    }
44
}
45