Skip to content

Commit

Permalink
Update FlarumUser.php
Browse files Browse the repository at this point in the history
  • Loading branch information
llaumgui authored Dec 19, 2023
1 parent 158969e commit 281e8b6
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/FlarumUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function __construct( string $username, string $password ) {
/**
* Get all flarum user information
*/
private function getUserInfo() : void {
private function getUserInfo(): void {
$userInfos = MediaWikiServices::getInstance()
->getService( 'FlarumApiService' )
->getUserInfo( $this->id );
Expand All @@ -88,7 +88,7 @@ private function getUserInfo() : void {
* Check if user exists.
* @return bool
*/
public function exists() : bool {
public function exists(): bool {
if ( $this->id > 0 ) {
return true;
}
Expand All @@ -100,15 +100,15 @@ public function exists() : bool {
*
* @return int flarum user Uid
*/
public function getId() : int {
public function getId(): int {
return $this->id;
}

/**
* Get username
* @return string User username
*/
public function getUsername() : string {
public function getUsername(): string {
if ( $this->username === "" ) {
$this->getUserInfo();
}
Expand All @@ -119,7 +119,7 @@ public function getUsername() : string {
* Get displayName
* @return string User displayName
*/
public function getDisplayName() : string {
public function getDisplayName(): string {
if ( $this->displayName === "" ) {
$this->getUserInfo();
}
Expand All @@ -130,7 +130,7 @@ public function getDisplayName() : string {
* Get email
* @return string User email
*/
public function getEmail() : string {
public function getEmail(): string {
if ( $this->email === "" ) {
$this->getUserInfo();
}
Expand All @@ -141,7 +141,7 @@ public function getEmail() : string {
* Get isEmailConfirmed
* @return string User isEmailConfirmed
*/
public function isEmailConfirmed() : bool {
public function isEmailConfirmed(): bool {
if ( $this->isEmailConfirmed === null ) {
$this->getUserInfo();
}
Expand All @@ -152,7 +152,7 @@ public function isEmailConfirmed() : bool {
* Get joinTime
* @return string User joinTime
*/
public function getJoinTime() : DateTime {
public function getJoinTime(): DateTime {
if ( $this->joinTime === null ) {
$this->getUserInfo();
}
Expand All @@ -163,7 +163,7 @@ public function getJoinTime() : DateTime {
* flarum use have needed post ?
* @return bool
*/
public function hasCommentCount() : string {
public function hasCommentCount(): string {
if ( $this->commentCount === 0 ) {
$this->getUserInfo();
}
Expand Down

0 comments on commit 281e8b6

Please sign in to comment.