GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

RequestCapturePayment   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 60
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 60
loc 60
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getMerchantInfo() 4 4 1
A setMerchantInfo() 5 5 1
A getTransaction() 4 4 1
A setTransaction() 5 5 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
3
namespace zaporylie\Vipps\Model\Payment;
4
5
use JMS\Serializer\Annotation as Serializer;
6
7
/**
8
 * Class RequestCapturePayment
9
 *
10
 * @package Vipps\Model\Payment
11
 */
12 View Code Duplication
class RequestCapturePayment
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
13
{
14
    /**
15
     * @var \zaporylie\Vipps\Model\Payment\MerchantInfo
16
     * @Serializer\Type("zaporylie\Vipps\Model\Payment\MerchantInfo")
17
     */
18
    protected $merchantInfo;
19
20
    /**
21
     * @var \zaporylie\Vipps\Model\Payment\Transaction
22
     * @Serializer\Type("zaporylie\Vipps\Model\Payment\Transaction")
23
     */
24
    protected $transaction;
25
26
    /**
27
     * Gets merchantInfo value.
28
     *
29
     * @return \zaporylie\Vipps\Model\Payment\MerchantInfo
30
     */
31
    public function getMerchantInfo()
32
    {
33
        return $this->merchantInfo;
34
    }
35
36
    /**
37
     * Sets merchantInfo variable.
38
     *
39
     * @param \zaporylie\Vipps\Model\Payment\MerchantInfo $merchantInfo
40
     *
41
     * @return $this
42
     */
43
    public function setMerchantInfo($merchantInfo)
44
    {
45
        $this->merchantInfo = $merchantInfo;
46
        return $this;
47
    }
48
49
    /**
50
     * Gets transaction value.
51
     *
52
     * @return \zaporylie\Vipps\Model\Payment\Transaction
53
     */
54
    public function getTransaction()
55
    {
56
        return $this->transaction;
57
    }
58
59
    /**
60
     * Sets transaction variable.
61
     *
62
     * @param \zaporylie\Vipps\Model\Payment\Transaction $transaction
63
     *
64
     * @return $this
65
     */
66
    public function setTransaction($transaction)
67
    {
68
        $this->transaction = $transaction;
69
        return $this;
70
    }
71
}
72