Skip to content

Commit

Permalink
phpdoc: cleanup of inline-arrays and param doc
Browse files Browse the repository at this point in the history
� Conflicts:
�	src/Repository/UserRepository.php
  • Loading branch information
datengraben committed Feb 6, 2025
1 parent d1428c2 commit fff9610
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/Repository/UserRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,38 @@ public static function getSelectableCBManagers() {
return get_users( [ 'role__in' => self::getManagerRoles() ] );
}

/**
* Returns all valid roles that are considered by CommonsBooking as "Manager" roles.
*
* @return string[]
*/
public static function getManagerRoles(): array {
$manager_roles = [ Plugin::$CB_MANAGER_ID ];
/**
* Default list of manager roles
*
* @since 2.8.3
* @since 2.9.0
*
* @param string[] $manager_roles list of allowed manager roles that is returned by {@see UserRepository::getManagerRoles()}
*/
return apply_filters( 'commonsbooking_manager_roles', [ Plugin::$CB_MANAGER_ID ] );
return apply_filters( 'commonsbooking_manager_roles', $manager_roles );
}

/**
* Will get all roles that are considered by CommonsBooking as "Administrator" roles
* Returns all roles that are considered by CommonsBooking as "Administrator" roles.
*
* @return array
* @return string[]
*/
public static function getAdminRoles(): array {
$admin_roles = [ 'administrator' ];
/**
* Default list of admin roles
*
* @since 2.8.3
*
* @param string[] $admin_roles list of allowed admin roles that are returned by {@see UserRepository::getAdminRoles()}
*/
return apply_filters( 'commonsbooking_admin_roles', [ 'administrator' ] );
return apply_filters( 'commonsbooking_admin_roles', $admin_roles );
}

/**
Expand Down

0 comments on commit fff9610

Please sign in to comment.