IssuedInvoiceItemApiModelUpdate::getEnumMap()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 7
Ratio 100 %

Importance

Changes 0
Metric Value
dl 7
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Fousky\Component\iDoklad\Model\IssuedInvoices;
4
5
use Fousky\Component\iDoklad\LOV\PriceTypeEnum;
6
use Fousky\Component\iDoklad\LOV\VatRateTypeEnum;
7
use Fousky\Component\iDoklad\Model\iDokladAbstractModel;
8
use Symfony\Component\Validator\Constraints as Assert;
9
10
/**
11
 * @method null|float getAmount()
12
 * @method null|int getId()
13
 * @method null|string getName()
14
 * @method null|PriceTypeEnum getPriceType()
15
 * @method null|string getUnit()
16
 * @method null|float getUnitPrice()
17
 * @method null|VatRateTypeEnum getVatRateType()
18
 *
19
 * @author Lukáš Brzák <[email protected]>
20
 */
21 View Code Duplication
class IssuedInvoiceItemApiModelUpdate extends iDokladAbstractModel
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
22
{
23
    /** @Assert\Type(type="float") */
24
    public $Amount;
25
26
    /** @Assert\IsNull(message="This value is readonly.") */
27
    public $Id;
28
29
    /** @Assert\Type(type="string") */
30
    public $Name;
31
32
    /** @Assert\Type(type="Fousky\Component\iDoklad\LOV\PriceTypeEnum") */
33
    public $PriceType;
34
35
    /** @Assert\Type(type="string") */
36
    public $Unit;
37
38
    /** @Assert\Type(type="float") */
39
    public $UnitPrice;
40
41
    /** @Assert\Type(type="Fousky\Component\iDoklad\LOV\VatRateTypeEnum") */
42
    public $VatRateType;
43
44
    /**
45
     * @return array
46
     */
47
    public static function getEnumMap(): array
48
    {
49
        return [
50
            'PriceType' => PriceTypeEnum::class,
51
            'VatRateType' => VatRateTypeEnum::class,
52
        ];
53
    }
54
}
55