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:
Eloy Lafuente (stronk7)
2024-02-28 23:33:26 +01:00
parent e567c21d6e
commit ba1f804ffa
972 changed files with 2098 additions and 2094 deletions
@@ -42,7 +42,7 @@ class cognitive_depth extends activity_base {
*
* @return \lang_string
*/
public static function get_name() : \lang_string {
public static function get_name(): \lang_string {
return new \lang_string('indicator:cognitivedepth', 'mod_folder');
}
@@ -42,7 +42,7 @@ class social_breadth extends activity_base {
*
* @return \lang_string
*/
public static function get_name() : \lang_string {
public static function get_name(): \lang_string {
return new \lang_string('indicator:socialbreadth', 'mod_folder');
}
+1 -1
View File
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() : string {
public static function get_reason(): string {
return 'privacy:metadata';
}
}
+1 -1
View File
@@ -848,7 +848,7 @@ function mod_folder_core_calendar_provide_event_action(calendar_event $event,
* @param array $args The path (the part after the filearea and before the filename).
* @return array The itemid and the filepath inside the $args path, for the defined filearea.
*/
function mod_folder_get_path_from_pluginfile(string $filearea, array $args) : array {
function mod_folder_get_path_from_pluginfile(string $filearea, array $args): array {
// Folder never has an itemid (the number represents the revision but it's not stored in database).
array_shift($args);