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.

PaymentList   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setPayments() 0 8 2
A addPayment() 0 4 1
A getPayments() 0 4 1
1
<?php
2
3
namespace Onend\PayPal\Payment\Model;
4
5
use JMS\Serializer\Annotation as JMS;
6
7
use Onend\PayPal\Common\Model\AbstractModel;
8
9
class PaymentList extends AbstractModel
10
{
11
    /**
12
     * @JMS\Type("array<Onend\PayPal\Payment\Model\Payment>")
13
     *
14
     * @var Payment[]
15
     */
16
    protected $payments;
17
18
    /**
19
     * @param Payment[] $payments
20
     */
21
    public function setPayments(array $payments)
22
    {
23
        $this->payments = [];
24
25
        foreach ($payments as $payment) {
26
            $this->addPayment($payment);
27
        }
28
    }
29
30
    /**
31
     * @param Payment $payment
32
     */
33
    public function addPayment(Payment $payment)
34
    {
35
        $this->payments[] = $payment;
36
    }
37
38
    /**
39
     * @return Payment[]
40
     */
41
    public function getPayments()
42
    {
43
        return $this->payments;
44
    }
45
}
46