Passed
Push — master ( fce6df...8e01ff )
by Georg
14:04 queued 11s
created

UserStatus   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 17
c 1
b 0
f 0
dl 0
loc 35
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * @copyright Copyright (c) 2020, Georg Ehrke
7
 *
8
 * @author Georg Ehrke <[email protected]>
9
 *
10
 * @license AGPL-3.0
11
 *
12
 * This code is free software: you can redistribute it and/or modify
13
 * it under the terms of the GNU Affero General Public License, version 3,
14
 * as published by the Free Software Foundation.
15
 *
16
 * This program is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
 * GNU Affero General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU Affero General Public License, version 3,
22
 * along with this program. If not, see <http://www.gnu.org/licenses/>
23
 *
24
 */
25
26
namespace OCA\UserStatus\Db;
27
28
use OCP\AppFramework\Db\Entity;
29
30
/**
31
 * Class UserStatus
32
 *
33
 * @package OCA\UserStatus\Db
34
 *
35
 * @method int getId()
36
 * @method void setId(int $id)
37
 * @method string getUserId()
38
 * @method void setUserId(string $userId)
39
 * @method string getStatus()
40
 * @method void setStatus(string $status)
41
 * @method int getStatusTimestamp()
42
 * @method void setStatusTimestamp(int $statusTimestamp)
43
 * @method bool getIsUserDefined()
44
 * @method void setIsUserDefined(bool $isUserDefined)
45
 * @method string getMessageId()
46
 * @method void setMessageId(string|null $messageId)
47
 * @method string getCustomIcon()
48
 * @method void setCustomIcon(string|null $customIcon)
49
 * @method string getCustomMessage()
50
 * @method void setCustomMessage(string|null $customMessage)
51
 * @method int getClearAt()
52
 * @method void setClearAt(int|null $clearAt)
53
 */
54
class UserStatus extends Entity {
55
56
	/** @var string */
57
	public $userId;
58
59
	/** @var string */
60
	public $status;
61
62
	/** @var int */
63
	public $statusTimestamp;
64
65
	/** @var boolean */
66
	public $isUserDefined;
67
68
	/** @var string|null */
69
	public $messageId;
70
71
	/** @var string|null */
72
	public $customIcon;
73
74
	/** @var string|null */
75
	public $customMessage;
76
77
	/** @var int|null */
78
	public $clearAt;
79
80
	public function __construct() {
81
		$this->addType('userId', 'string');
82
		$this->addType('status', 'string');
83
		$this->addType('statusTimestamp', 'int');
84
		$this->addType('isUserDefined', 'boolean');
85
		$this->addType('messageId', 'string');
86
		$this->addType('customIcon', 'string');
87
		$this->addType('customMessage', 'string');
88
		$this->addType('clearAt', 'int');
89
	}
90
}
91