Passed
Pull Request — master (#18)
by
02:40
created

User::getState()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace LineMob\Core\Mocky\Doctrine\Model;
4
5
use LineMob\Core\Storage\CommandData;
6
use LineMob\Core\Storage\CommandDataInterface;
7
8
/**
9
 * @Entity
10
 * @Table(name="user")
11
 */
12
class User extends CommandData implements CommandDataInterface
13
{
14
    /**
15
     * @Id
16
     * @GeneratedValue
17
     * @Column(type="integer")
18
     */
19
    protected $id;
20
21
    /**
22
     * @Column(type="string", nullable=true)
23
     */
24
    protected $lineUserId;
25
26
    /**
27
     * @Column(type="string", nullable=true)
28
     */
29
    protected $lineActiveCmd;
30
31
    /**
32
     * @Column(type="array", nullable=true)
33
     */
34
    protected $lineCommandData;
35
36
    /**
37
     * @Column(type="datetime_immutable", nullable=true)
38
     */
39
    protected $lineLastLogin;
40
41
    /**
42
     * @Column(type="json_array", nullable=true)
43
     * @var array
44
     */
45
    protected $state = [];
46
47
    /**
48
     * @return int
49
     */
50
    public function getId()
51
    {
52
        return $this->id;
53
    }
54
55
    /**
56
     * @return \DateTimeImmutable
57
     */
58
    public function getLineLastLogin()
59
    {
60
        return $this->lineLastLogin;
61
    }
62
63
    /**
64
     * @param \DateTimeImmutable $lineLastLogin
65
     */
66
    public function setLineLastLogin(\DateTimeImmutable $lineLastLogin = null)
67
    {
68
        $this->lineLastLogin = $lineLastLogin;
69
    }
70
71
    /**
72
     * @return array
73
     */
74
    public function getState()
75
    {
76
        return $this->state;
77
    }
78
79
    /**
80
     * @param array $state
81
     */
82
    public function setState(array $state)
83
    {
84
        $this->state = $state;
85
    }
86
}
87