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.

WireTransferPayment   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 34
ccs 10
cts 10
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 10 2
1
<?php
2
3
namespace CMPayments\PaymentSdk\Entities;
4
5
use Money\Money;
6
7
/**
8
 * Class WireTransferPayment
9
 * @package CMPayments\PaymentSdk\Entities
10
 * @author Jory Geerts <[email protected]>
11
 */
12
class WireTransferPayment extends Payment
13
{
14
    /**
15
     * @var \DateTime
16
     */
17
    private $expiryDate;
18
19
    /**
20
     * CreditCardPayment constructor.
21
     *
22
     * @param Money $money
23
     * @param array $issuers
0 ignored issues
show
Bug introduced by
There is no parameter named $issuers. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
24
     * @param string $purchaseId
25
     * @param \DateTime $expiryDate
26
     */
27 1
    public function __construct(Money $money, $purchaseId, \DateTime $expiryDate = null)
28
    {
29 1
        parent::__construct($money, 'WireTransfer', $purchaseId);
30
31 1
        $this->expiryDate = $expiryDate;
32 1
    }
33
34
    /** @inheritdoc */
35 1
    public function toArray()
36
    {
37 1
        $array = parent::toArray();
38
39 1
        if ($this->expiryDate) {
40 1
            $array['expires_at'] = $this->expiryDate->format('Y-m-d\TH:i:s\Z');
41 1
        }
42
43 1
        return $array;
44
    }
45
}
46