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.

SofortPayment::toArray()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 7
cts 7
cp 1
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 0
crap 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 SofortPayment 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
     * @var string
24
     */
25
    private $bic;
26
    /**
27
     * @var string
28
     */
29
    private $iban;
30
    /**
31
     * @var string
32
     */
33
    private $name;
34
35
    /**
36
     * IdealPayment constructor.
37
     * @param Money $money
38
     * @param string $purchaseId
39
     * @param string $bic
40
     * @param string $iban
41
     * @param string $name
42
     * @param string $description
43
     */
44 1
    public function __construct(Money $money, $purchaseId, $bic, $iban, $name, $description)
45
    {
46 1
        parent::__construct($money, 'SOFORT', $purchaseId);
47
48 1
        $this->description = $description;
49 1
        $this->bic = $bic;
50 1
        $this->iban = $iban;
51 1
        $this->name = $name;
52 1
    }
53
54
    /** @inheritdoc */
55 1
    public function toArray()
56
    {
57 1
        $array = parent::toArray();
58 1
        $array['payment_details']['bank_bic'] = $this->bic;
59 1
        $array['payment_details']['bank_account_number'] = $this->iban;
60 1
        $array['payment_details']['consumer_name'] = $this->name;
61 1
        $array['payment_details']['description'] = $this->description;
62 1
        return $array;
63
    }
64
}
65