Removed leftover abstract class.
This commit is contained in:
parent
65549e3fa4
commit
30e77bd698
2 changed files with 1 additions and 38 deletions
|
@ -1,38 +0,0 @@
|
|||
<?php
|
||||
namespace Misuzu\Users;
|
||||
|
||||
use Index\DateTime;
|
||||
use Index\Colour\Colour;
|
||||
|
||||
abstract class UserInfo {
|
||||
abstract public function getId(): string;
|
||||
abstract public function getName(): string;
|
||||
abstract public function getCountryCode(): string;
|
||||
|
||||
abstract public function isGuest(): bool;
|
||||
abstract public function isSystem(): bool;
|
||||
abstract public function isSuper(): bool;
|
||||
|
||||
abstract public function getDisplayRoleId(): string;
|
||||
|
||||
abstract public function getColour(): Colour;
|
||||
|
||||
abstract public function getCreatedDate(): DateTime;
|
||||
abstract public function getLastActiveDate(): DateTime;
|
||||
abstract public function getDeletedDate(): DateTime;
|
||||
|
||||
public function hasColour(): bool {
|
||||
return !$this->getColour()->shouldInherit();
|
||||
}
|
||||
|
||||
private static DateTime $epoch;
|
||||
public function isDeleted(): bool {
|
||||
return self::$epoch->diff($this->getDeletedDate())->totalSeconds() > 0;
|
||||
}
|
||||
|
||||
public static function init(): void {
|
||||
self::$epoch = DateTime::fromUnixTimeSeconds(0);
|
||||
}
|
||||
}
|
||||
|
||||
UserInfo::init();
|
|
@ -310,6 +310,7 @@ function get_country_name(string $code): string {
|
|||
|
||||
'XK' => 'Kosovo',
|
||||
'XM' => 'The Moon',
|
||||
'XS' => 'System',
|
||||
'XX' => 'Unknown',
|
||||
|
||||
'YE' => 'Yemen',
|
||||
|
|
Loading…
Reference in a new issue