Total Complexity | 5 |
Total Lines | 75 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
12 | class User extends CommandData implements CommandDataInterface |
||
13 | { |
||
14 | const START_STATE = 'started'; |
||
15 | |||
16 | /** |
||
17 | * @Id |
||
18 | * @GeneratedValue |
||
19 | * @Column(type="integer") |
||
20 | */ |
||
21 | protected $id; |
||
22 | |||
23 | /** |
||
24 | * @Column(type="string", nullable=true) |
||
25 | */ |
||
26 | protected $lineUserId; |
||
27 | |||
28 | /** |
||
29 | * @Column(type="string", nullable=true) |
||
30 | */ |
||
31 | protected $lineActiveCmd; |
||
32 | |||
33 | /** |
||
34 | * @Column(type="array", nullable=true) |
||
35 | */ |
||
36 | protected $lineCommandData; |
||
37 | |||
38 | /** |
||
39 | * @Column(type="datetime_immutable", nullable=true) |
||
40 | */ |
||
41 | protected $lineLastLogin; |
||
42 | |||
43 | /** |
||
44 | * @Column(type="json_array", nullable=true) |
||
45 | * @var array |
||
46 | */ |
||
47 | protected $state = [self::START_STATE => 1]; |
||
48 | |||
49 | /** |
||
50 | * @return int |
||
51 | */ |
||
52 | public function getId() |
||
53 | { |
||
54 | return $this->id; |
||
55 | } |
||
56 | |||
57 | /** |
||
58 | * @return \DateTimeImmutable |
||
59 | */ |
||
60 | public function getLineLastLogin() |
||
61 | { |
||
62 | return $this->lineLastLogin; |
||
63 | } |
||
64 | |||
65 | /** |
||
66 | * @param \DateTimeImmutable $lineLastLogin |
||
67 | */ |
||
68 | public function setLineLastLogin(\DateTimeImmutable $lineLastLogin = null) |
||
69 | { |
||
70 | $this->lineLastLogin = $lineLastLogin; |
||
71 | } |
||
72 | |||
73 | /** |
||
74 | * @return array |
||
75 | */ |
||
76 | public function getState() |
||
79 | } |
||
80 | |||
81 | /** |
||
82 | * @param array $state |
||
83 | */ |
||
84 | public function setState(array $state) |
||
89 |