Total Complexity | 4 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
11 | trait TMExtras |
||
12 | { |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | private $id = ''; |
||
17 | |||
18 | /** |
||
19 | * @var int |
||
20 | */ |
||
21 | private $attempts = 0; |
||
22 | |||
23 | /** |
||
24 | * @var int |
||
25 | */ |
||
26 | private $timestamp = 0; |
||
27 | |||
28 | /** |
||
29 | * @param string $id |
||
30 | * @param int $attempts |
||
31 | * @param int $timestamp |
||
32 | * @return static |
||
33 | */ |
||
34 | public function meta(string $id, int $attempts, int $timestamp) : self |
||
35 | { |
||
36 | $this->id = $id; |
||
37 | $this->attempts = $attempts; |
||
38 | $this->timestamp = $timestamp; |
||
39 | return $this; |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @return string |
||
44 | */ |
||
45 | public function id() : string |
||
46 | { |
||
47 | return $this->id; |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @return int |
||
52 | */ |
||
53 | public function attempts() : int |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * @return int |
||
60 | */ |
||
61 | public function timestamp() : int |
||
66 |