| Total Complexity | 4 |
| Total Lines | 66 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 34 | class UserLiveStatusEvent extends Event { |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @var string |
||
| 38 | * @since 20.0.0 |
||
| 39 | */ |
||
| 40 | public const STATUS_ONLINE = 'online'; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @var string |
||
| 44 | * @since 20.0.0 |
||
| 45 | */ |
||
| 46 | public const STATUS_AWAY = 'away'; |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @var string |
||
| 50 | * @since 20.0.0 |
||
| 51 | */ |
||
| 52 | public const STATUS_OFFLINE = 'offline'; |
||
| 53 | |||
| 54 | /** @var IUser */ |
||
| 55 | private $user; |
||
| 56 | |||
| 57 | /** @var string */ |
||
| 58 | private $status; |
||
| 59 | |||
| 60 | /** @var int */ |
||
| 61 | private $timestamp; |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @param IUser $user |
||
| 65 | * @param string $status |
||
| 66 | * @param int $timestamp |
||
| 67 | * @since 20.0.0 |
||
| 68 | */ |
||
| 69 | public function __construct(IUser $user, |
||
| 70 | string $status, |
||
| 71 | int $timestamp) { |
||
| 72 | parent::__construct(); |
||
| 73 | $this->user = $user; |
||
| 74 | $this->status = $status; |
||
| 75 | $this->timestamp = $timestamp; |
||
| 76 | } |
||
| 77 | |||
| 78 | /** |
||
| 79 | * @return IUser |
||
| 80 | * @since 20.0.0 |
||
| 81 | */ |
||
| 82 | public function getUser(): IUser { |
||
| 83 | return $this->user; |
||
| 84 | } |
||
| 85 | |||
| 86 | /** |
||
| 87 | * @return string |
||
| 88 | * @since 20.0.0 |
||
| 89 | */ |
||
| 90 | public function getStatus(): string { |
||
| 91 | return $this->status; |
||
| 92 | } |
||
| 93 | |||
| 94 | /** |
||
| 95 | * @return int |
||
| 96 | * @since 20.0.0 |
||
| 97 | */ |
||
| 98 | public function getTimestamp(): int { |
||
| 100 | } |
||
| 101 | } |
||
| 102 |