iDokladAbstractEnum::createJson()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Fousky\Component\iDoklad\LOV;
4
5
/**
6
 * @author Lukáš Brzák <[email protected]>
7
 */
8
abstract class iDokladAbstractEnum implements iDokladEnumInterface
9
{
10
    /** @var int $value */
11
    protected $value;
12
13
    /**
14
     * @return int
15
     */
16
    public function createJson(): int
17
    {
18
        return $this->value;
19
    }
20
21
    /**
22
     * @return string
23
     */
24
    public function __toString(): string
25
    {
26
        return (string) $this->value;
27
    }
28
29
    /**
30
     * @param int $value
31
     */
32
    public function __construct(int $value)
33
    {
34
        $this->value = $value;
35
    }
36
37
    /**
38
     * @return int
39
     */
40
    public function getValue(): int
41
    {
42
        return $this->value;
43
    }
44
}
45