PaymentCallEntity   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 10
c 1
b 0
f 0
dl 0
loc 33
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A setInvoiceDate() 0 7 2
1
<?php
2
3
/**
4
 * PHP version 5.4 and 8
5
 *
6
 * @category  MessageEntity
7
 * @package   Payever\Payments
8
 * @author    payever GmbH <[email protected]>
9
 * @copyright 2017-2021 payever GmbH
10
 * @license   MIT <https://opensource.org/licenses/MIT>
11
 * @link      https://docs.payever.org/shopsystems/api/getting-started
12
 */
13
14
namespace Payever\ExternalIntegration\Payments\Http\MessageEntity;
15
16
use Payever\ExternalIntegration\Core\Http\MessageEntity\CallEntity;
17
18
/**
19
 * This class represents Payment Call Entity
20
 *
21
 * @method string    getPaymentId()
22
 * @method string    getCustomerId()
23
 * @method string    getInvoiceId()
24
 * @method \DateTime|false getInvoiceDate()
25
 * @method string    getType()
26
 * @method string    getMessage()
27
 * @method self      setPaymentId(string $paymentId)
28
 * @method self      setCustomerId(string $customerId)
29
 * @method self      setInvoiceId(string $invoiceId)
30
 * @method self      setType(string $type)
31
 * @method self      setMessage(string $message)
32
 */
33
class PaymentCallEntity extends CallEntity
34
{
35
    /** @var string $paymentId */
36
    protected $paymentId;
37
38
    /** @var string $customerId */
39
    protected $customerId;
40
41
    /** @var string $invoiceId */
42
    protected $invoiceId;
43
44
    /** @var \DateTime|bool $invoiceDate */
45
    protected $invoiceDate;
46
47
    /** @var string $type */
48
    protected $type;
49
50
    /** @var string $message */
51
    protected $message;
52
53
    /**
54
     * Sets Invoice Date
55
     *
56
     * @param string $invoiceDate
57
     * @return self
58
     */
59
    public function setInvoiceDate($invoiceDate)
60
    {
61
        if ($invoiceDate) {
62
            $this->invoiceDate = date_create($invoiceDate);
63
        }
64
65
        return $this;
66
    }
67
}
68