MDL-65292 style: Fix all function declarations white space
This has been generated running the following Sniffs, all them part of the Moodle's CodeSniffer standard: - PSR12.Functions.ReturnTypeDeclaration - PSR12.Functions.NullableTypeDeclaration - moodle.Methods.MethodDeclarationSpacing - Squiz.Whitespace.ScopeKeywordSpacing All them are, exclusively, about correct spacing, so the changes are, all them, only white space changes. Only exceptions to the above are 3 changes what were setting the return type in a new line, and, when that happens, the closing parenthesis (bracket) has to go to the same line than the colon.
This commit is contained in:
@@ -168,7 +168,7 @@ class api {
|
||||
*
|
||||
* @return array An array of the DPO role shortnames
|
||||
*/
|
||||
public static function get_dpo_role_names() : array {
|
||||
public static function get_dpo_role_names(): array {
|
||||
global $DB;
|
||||
|
||||
$dporoleids = self::get_assigned_privacy_officer_roles();
|
||||
@@ -524,7 +524,7 @@ class api {
|
||||
* @param array $userids
|
||||
* @return array
|
||||
*/
|
||||
public static function find_ongoing_request_types_for_users(array $userids) : array {
|
||||
public static function find_ongoing_request_types_for_users(array $userids): array {
|
||||
global $DB;
|
||||
|
||||
if (empty($userids)) {
|
||||
@@ -1201,7 +1201,7 @@ class api {
|
||||
* @return contextlist_collection The collection of approved_contextlist objects.
|
||||
*/
|
||||
public static function get_approved_contextlist_collection_for_collection(contextlist_collection $collection,
|
||||
\stdClass $foruser, int $type) : contextlist_collection {
|
||||
\stdClass $foruser, int $type): contextlist_collection {
|
||||
|
||||
// Create the approved contextlist collection object.
|
||||
$approvedcollection = new contextlist_collection($collection->get_userid());
|
||||
@@ -1326,7 +1326,7 @@ class api {
|
||||
* @param \DateInterval $interval
|
||||
* @return string
|
||||
*/
|
||||
public static function format_retention_period(\DateInterval $interval) : string {
|
||||
public static function format_retention_period(\DateInterval $interval): string {
|
||||
// It is one or another.
|
||||
if ($interval->y) {
|
||||
$formattedtime = get_string('numyears', 'moodle', $interval->format('%y'));
|
||||
|
||||
Reference in New Issue
Block a user