1 | <?php |
||
29 | class BaseMember { |
||
30 | |||
31 | const LEVEL_NONE = 0; |
||
32 | const LEVEL_MEMBER = 1; |
||
33 | const LEVEL_MODERATOR = 6; |
||
34 | const LEVEL_ADMIN = 8; |
||
35 | const LEVEL_OWNER = 9; |
||
36 | |||
37 | const STATUS_NONMEMBER = 'Unknown'; |
||
38 | const STATUS_INVITED = 'Invited'; |
||
39 | const STATUS_REQUEST = 'Requesting'; |
||
40 | const STATUS_MEMBER = 'Member'; |
||
41 | const STATUS_BLOCKED = 'Blocked'; |
||
42 | const STATUS_KICKED = 'Kicked'; |
||
43 | |||
44 | /** @var int */ |
||
45 | private $circleId; |
||
46 | |||
47 | /** @var string */ |
||
48 | private $userId; |
||
49 | |||
50 | /** @var int */ |
||
51 | private $level; |
||
52 | |||
53 | /** @var string */ |
||
54 | private $status; |
||
55 | |||
56 | /** @var string */ |
||
57 | private $note; |
||
58 | |||
59 | /** @var string */ |
||
60 | private $joined; |
||
61 | |||
62 | public function __construct($circleId = -1, $userId = '') { |
||
73 | |||
74 | |||
75 | public function setCircleId($circleId) { |
||
80 | |||
81 | public function getCircleId() { |
||
84 | |||
85 | |||
86 | public function setUserId($userId) { |
||
91 | |||
92 | public function getUserId() { |
||
95 | |||
96 | |||
97 | public function setLevel($level) { |
||
102 | |||
103 | public function getLevel() { |
||
106 | |||
107 | |||
108 | public function setNote($note) { |
||
113 | |||
114 | public function getNote() { |
||
117 | |||
118 | |||
119 | public function setStatus($status) { |
||
128 | |||
129 | public function getStatus() { |
||
132 | |||
133 | |||
134 | public function setJoined($joined) { |
||
139 | |||
140 | public function getJoined() { |
||
143 | |||
144 | |||
145 | /** |
||
146 | * @param array $arr |
||
147 | * |
||
148 | * @return null |
||
|
|||
149 | */ |
||
150 | public function fromArray($arr) { |
||
164 | |||
165 | |||
166 | } |
||
167 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.