1 | <?php declare(strict_types=1); |
||
26 | class Identifier implements IdentifierInterface |
||
27 | { |
||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | private $index; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | private $type; |
||
37 | |||
38 | /** |
||
39 | * @var bool |
||
40 | */ |
||
41 | private $hasMeta; |
||
42 | |||
43 | /** |
||
44 | * @var mixed |
||
45 | */ |
||
46 | private $meta; |
||
47 | |||
48 | /** |
||
49 | * @param string $index |
||
50 | * @param string $type |
||
51 | * @param bool $hasMeta |
||
52 | * @param mixed $meta |
||
53 | * |
||
54 | * @SuppressWarnings(PHPMD.BooleanArgumentFlag) |
||
55 | */ |
||
56 | 4 | public function __construct(string $index, string $type, bool $hasMeta = false, $meta = null) |
|
64 | |||
65 | /** |
||
66 | * @inheritdoc |
||
67 | */ |
||
68 | 4 | public function getId(): string |
|
72 | |||
73 | /** |
||
74 | * @param string $index |
||
75 | * |
||
76 | * @return self |
||
77 | */ |
||
78 | 4 | public function setId(string $index): self |
|
84 | |||
85 | /** |
||
86 | * @inheritdoc |
||
87 | */ |
||
88 | 4 | public function getType(): string |
|
92 | |||
93 | /** |
||
94 | * @param string $type |
||
95 | * |
||
96 | * @return self |
||
97 | */ |
||
98 | 4 | public function setType(string $type): self |
|
104 | |||
105 | /** |
||
106 | * @inheritdoc |
||
107 | */ |
||
108 | 4 | public function hasIdentifierMeta(): bool |
|
112 | |||
113 | /** |
||
114 | * @inheritdoc |
||
115 | */ |
||
116 | 2 | public function getIdentifierMeta() |
|
120 | |||
121 | /** |
||
122 | * @param mixed $meta |
||
123 | * |
||
124 | * @return self |
||
125 | */ |
||
126 | 2 | public function setIdentifierMeta($meta): self |
|
133 | } |
||
134 |