CashVoucherItemApiModelUpdate   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getAvailableProperties() 0 11 1
1
<?php
2
3
namespace Fousky\Component\iDoklad\Model\CashVoucher;
4
5
use Fousky\Component\iDoklad\LOV\PriceTypeWithoutOnlyBaseEnum;
6
use Fousky\Component\iDoklad\LOV\VatRateTypeEnum;
7
use Fousky\Component\iDoklad\Model\iDokladAbstractModel;
8
9
/**
10
 * @method null|float getAmount()
11
 * @method null|int getId()
12
 * @method null|string getName()
13
 * @method null|float getPrice()
14
 * @method null|PriceTypeWithoutOnlyBaseEnum getPriceType()
15
 * @method null|bool getStatus()
16
 * @method null|string getVariableSymbol()
17
 * @method null|float getVatRate()
18
 * @method null|VatRateTypeEnum getVatRateType()
19
 *
20
 * @author Lukáš Brzák <[email protected]>
21
 */
22
class CashVoucherItemApiModelUpdate extends iDokladAbstractModel
23
{
24
    public $Amount;
25
26
    public $Name;
27
28
    public $Price;
29
30
    public $PriceType;
31
32
    public $Status;
33
34
    public $VariableSymbol;
35
36
    public $VatRate;
37
38
    public $VatRateType;
39
40
    /**
41
     * @param string $Name
42
     * @param float  $Price
43
     * @param array  $properties Properties key=>value see getAvailableProperties()
44
     *
45
     * @throws \InvalidArgumentException
46
     */
47
    public function __construct(string $Name, float $Price, array $properties = [])
48
    {
49
        $this->Name = $Name;
50
        $this->Price = $Price;
51
52
        $this->processProperties($properties);
53
    }
54
55
    /**
56
     * @return array
57
     */
58
    public function getAvailableProperties(): array
59
    {
60
        return [
61
            'Amount',
62
            'PriceType',
63
            'Status',
64
            'VariableSymbol',
65
            'VatRate',
66
            'VatRateType',
67
        ];
68
    }
69
}
70