Passed
Pull Request — master (#28)
by Manuel
09:19
created

ReturnUrls   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 47
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setAbort() 0 5 1
A __construct() 0 5 1
A getFail() 0 3 1
A getAbort() 0 3 1
A getSuccess() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace Ticketpark\SaferpayJson\Request\Container;
4
5
use JMS\Serializer\Annotation\SerializedName;
6
7
final class ReturnUrls
8
{
9
    /**
10
     * @var string
11
     * @SerializedName("Success")
12
     */
13
    private $success;
14
15
    /**
16
     * @var string
17
     * @SerializedName("Fail")
18
     */
19
    private $fail;
20
21
    /**
22
     * @var string|null
23
     * @SerializedName("Abort")
24
     */
25
    private $abort;
26
27
    public function __construct(string $success, string $fail, string $abort = null)
28
    {
29
        $this->success = $success;
30
        $this->fail = $fail;
31
        $this->abort = $abort;
32
    }
33
34
    public function getSuccess(): string
35
    {
36
        return $this->success;
37
    }
38
39
    public function getFail(): string
40
    {
41
        return $this->fail;
42
    }
43
44
    public function getAbort(): ?string
45
    {
46
        return $this->abort;
47
    }
48
49
    public function setAbort(?string $abort): self
50
    {
51
        $this->abort = $abort;
52
53
        return $this;
54
    }
55
}
56