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.

PaypalPayment   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 32
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A toArray() 0 6 1
1
<?php
2
3
namespace CMPayments\PaymentSdk\Entities;
4
5
use Money\Money;
6
7
/**
8
 * Class PaypalPayment
9
 * @package CMPayments\PaymentSdk\Entities
10
 * @author Jory Geerts <[email protected]>
11
 */
12
class PaypalPayment extends Payment
13
{
14
    /**
15
     * @var string
16
     */
17
    private $issuerId;
0 ignored issues
show
Unused Code introduced by
The property $issuerId is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
18
    /**
19
     * @var string
20
     */
21
    private $description;
22
23
    /**
24
     * IdealPayment constructor.
25
     * @param Money $money
26
     * @param string $purchaseId
27
     * @param string $description
28
     */
29 1
    public function __construct(Money $money, $purchaseId, $description)
30
    {
31 1
        parent::__construct($money, 'PayPal', $purchaseId);
32
33 1
        $this->description = $description;
34 1
    }
35
36
    /** @inheritdoc */
37 1
    public function toArray()
38
    {
39 1
        $array = parent::toArray();
40 1
        $array['payment_details']['description'] = $this->description;
41 1
        return $array;
42
    }
43
}
44