CashVoucherApiModelUpdate   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 50
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getAvailableProperties() 0 13 1
1
<?php
2
3
namespace Fousky\Component\iDoklad\Model\CashVoucher;
4
5
use Fousky\Component\iDoklad\Model\iDokladAbstractModel;
6
7
/**
8
 * @method null|int getCashRegisterId()
9
 * @method null|\DateTime getDateOfTransaction()
10
 * @method null|float getExchangeRate()
11
 * @method null|float getExchangeRateAmount()
12
 * @method null|CashVoucherItemApiModelUpdate getItem()
13
 * @method null|int getMyCompanyDocumentAddressId()
14
 * @method null|int getPartnerContactId()
15
 * @method null|int getPartnerDocumentAddressId()
16
 * @method null|string getPerson()
17
 *
18
 * @author Lukáš Brzák <[email protected]>
19
 */
20
class CashVoucherApiModelUpdate extends iDokladAbstractModel
21
{
22
    public $CashRegisterId;
23
24
    public $DateOfTransaction;
25
26
    public $ExchangeRate;
27
28
    public $ExchangeRateAmount;
29
30
    public $Item;
31
32
    public $MyCompanyDocumentAddressId;
33
34
    public $PartnerContactId;
35
36
    public $PartnerDocumentAddressId;
37
38
    public $Person;
39
40
    /**
41
     * @param CashVoucherItemApiModelUpdate $Item
42
     * @param array                         $properties Properties key=>value see getAvailableProperties()
43
     *
44
     * @throws \InvalidArgumentException
45
     */
46
    public function __construct(CashVoucherItemApiModelUpdate $Item, array $properties = [])
47
    {
48
        $this->Item = $Item;
49
50
        $this->processProperties($properties);
51
    }
52
53
    /**
54
     * @return array
55
     */
56
    public function getAvailableProperties(): array
57
    {
58
        return [
59
            'CashRegisterId',
60
            'DateOfTransaction',
61
            'ExchangeRate',
62
            'ExchangeRateAmount',
63
            'MyCompanyDocumentAddressId',
64
            'PartnerContactId',
65
            'PartnerDocumentAddressId',
66
            'Person',
67
        ];
68
    }
69
}
70