Failed Conditions
Pull Request — experimental/sf (#3225)
by Kentaro
50:47 queued 42:12
created

PaymentResult   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 77
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 26.67%

Importance

Changes 0
Metric Value
dl 0
loc 77
ccs 4
cts 15
cp 0.2667
rs 10
c 0
b 0
f 0
wmc 6
lcom 0
cbo 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setSuccess() 0 6 1
A isSuccess() 0 4 1
A getErrors() 0 4 1
A setErrors() 0 6 1
A setResponse() 0 6 1
A getResponse() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of EC-CUBE
5
 *
6
 * Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
7
 *
8
 * http://www.lockon.co.jp/
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Eccube\Service\Payment;
15
16
use Symfony\Component\HttpFoundation\Response;
17
18
class PaymentResult
0 ignored issues
show
introduced by
Missing class doc comment
Loading history...
19
{
20
    /**
21
     * @var array
22
     */
23
    private $errors;
24
25
    /**
26
     * @var boolean
27
     */
28
    private $success;
29
30
    /**
31
     * @var Response
32
     */
33
    private $response;
34
35
    /**
36
     * @param boolean $success
37
     *
38
     * @return PaymentResult
39
     */
40
    public function setSuccess($success)
41
    {
42
        $this->success = $success;
43
44
        return $this;
45
    }
46
47
    /**
48
     * @return boolean
49
     */
50 7
    public function isSuccess()
51
    {
52 7
        return true;
53
    }
54
55
    /**
56
     * @return array
57
     */
58
    public function getErrors()
59
    {
60
        return [];
61
    }
62
63
    /**
64
     * @param array $errors
65
     *
66
     * @return PaymentResult
67
     */
68
    public function setErrors(array $errors)
69
    {
70
        $this->errors = $errors;
71
72
        return $this;
73
    }
74
75
    /**
76
     * @param Response $response
77
     *
78
     * @return PaymentResult
79
     */
80
    public function setResponse(Response $response)
81
    {
82
        $this->response = $response;
83
84
        return $this;
85
    }
86
87
    /**
88
     * @return Response
89
     */
90 6
    public function getResponse()
91
    {
92 6
        return $this->response;
93
    }
94
}
95