Skip to content

Commit

Permalink
fixup! Introduce user id assigned typed events for LDAP usage
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
  • Loading branch information
come-nc committed Sep 10, 2024
1 parent 6d0cca1 commit f52dda0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 21 deletions.
13 changes: 6 additions & 7 deletions lib/public/User/Events/BeforeUserIdUnassignedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,20 @@
use OCP\EventDispatcher\Event;

/**
* @since 27.0.0
* @since 31.0.0
*/
class BeforeUserIdUnassignedEvent extends Event {
private string $userId;

/**
* @since 27.0.0
* @since 31.0.0
*/
public function __construct(string $userId) {
public function __construct(
private string $userId,
) {
parent::__construct();
$this->userId = $userId;
}

/**
* @since 27.0.0
* @since 31.0.0
*/
public function getUserId(): string {
return $this->userId;
Expand Down
13 changes: 6 additions & 7 deletions lib/public/User/Events/UserIdAssignedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,20 @@
use OCP\EventDispatcher\Event;

/**
* @since 27.0.0
* @since 31.0.0
*/
class UserIdAssignedEvent extends Event {
private string $userId;

/**
* @since 27.0.0
* @since 31.0.0
*/
public function __construct(string $userId) {
public function __construct(
private string $userId,
) {
parent::__construct();
$this->userId = $userId;
}

/**
* @since 27.0.0
* @since 31.0.0
*/
public function getUserId(): string {
return $this->userId;
Expand Down
13 changes: 6 additions & 7 deletions lib/public/User/Events/UserIdUnassignedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,20 @@
use OCP\EventDispatcher\Event;

/**
* @since 27.0.0
* @since 31.0.0
*/
class UserIdUnassignedEvent extends Event {
private string $userId;

/**
* @since 27.0.0
* @since 31.0.0
*/
public function __construct(string $userId) {
public function __construct(
private string $userId,
) {
parent::__construct();
$this->userId = $userId;
}

/**
* @since 27.0.0
* @since 31.0.0
*/
public function getUserId(): string {
return $this->userId;
Expand Down

0 comments on commit f52dda0

Please sign in to comment.