CashVoucherItemApiModelInsert::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\CashVoucher;
4
5
use Fousky\Component\iDoklad\LOV\PriceTypeWithoutOnlyBaseEnum;
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|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 View Code Duplication
class CashVoucherItemApiModelInsert 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...
23
{
24
    /**
25
     * @Assert\NotBlank()
26
     */
27
    public $Amount;
28
29
    /**
30
     * @Assert\NotBlank()
31
     */
32
    public $Name;
33
34
    /**
35
     * @Assert\NotBlank()
36
     */
37
    public $Price;
38
39
    public $PriceType;
40
41
    public $Status;
42
43
    public $VariableSymbol;
44
45
    public $VatRate;
46
47
    public $VatRateType;
48
49
    /**
50
     * @param array $properties
51
     *
52
     * @throws \InvalidArgumentException
53
     */
54
    public function __construct(array $properties = [])
55
    {
56
        $this->processProperties($properties);
57
    }
58
59
    /**
60
     * @return array
61
     */
62
    public static function getEnumMap(): array
63
    {
64
        return [
65
            'PriceType' => PriceTypeWithoutOnlyBaseEnum::class,
66
            'VatRateType' => VatRateTypeEnum::class,
67
        ];
68
    }
69
}
70