Total Complexity | 3 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
13 | trait Identify |
||
14 | { |
||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | private $identify = null; |
||
19 | |||
20 | /** |
||
21 | * @return string |
||
22 | */ |
||
23 | public function id() : string |
||
24 | { |
||
25 | return $this->identify ?? $this->resetID()->id(); |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * @return self |
||
30 | */ |
||
31 | public function resetID() : self |
||
32 | { |
||
33 | return $this->assignID(Uuid::uuid4()->toString()); |
||
|
|||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @param string $id |
||
38 | * @return self |
||
39 | */ |
||
40 | public function assignID(string $id) : self |
||
44 | } |
||
45 | } |
||
46 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.