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
+1 -1
View File
@@ -40,7 +40,7 @@ class test_indicator_discrete extends \core_analytics\local\indicator\discrete {
*
* @return \lang_string
*/
public static function get_name() : \lang_string {
public static function get_name(): \lang_string {
// Using a string that exists and contains a corresponding '_help' string.
return new \lang_string('allowstealthmodules');
}
+1 -1
View File
@@ -42,7 +42,7 @@ class test_indicator_fullname extends \core_analytics\local\indicator\linear {
*
* @return \lang_string
*/
public static function get_name() : \lang_string {
public static function get_name(): \lang_string {
// Using a string that exists and contains a corresponding '_help' string.
return new \lang_string('allowstealthmodules');
}
+1 -1
View File
@@ -42,7 +42,7 @@ class test_indicator_max extends \core_analytics\local\indicator\binary {
*
* @return \lang_string
*/
public static function get_name() : \lang_string {
public static function get_name(): \lang_string {
// Using a string that exists and contains a corresponding '_help' string.
return new \lang_string('allowstealthmodules');
}
+1 -1
View File
@@ -42,7 +42,7 @@ class test_indicator_min extends \core_analytics\local\indicator\binary {
*
* @return \lang_string
*/
public static function get_name() : \lang_string {
public static function get_name(): \lang_string {
// Using a string that exists and contains a corresponding '_help' string.
return new \lang_string('allowstealthmodules');
}
+1 -1
View File
@@ -42,7 +42,7 @@ class test_indicator_multiclass extends \core_analytics\local\indicator\linear {
*
* @return \lang_string
*/
public static function get_name() : \lang_string {
public static function get_name(): \lang_string {
// Using a string that exists and contains a corresponding '_help' string.
return new \lang_string('allowstealthmodules');
}
+1 -1
View File
@@ -42,7 +42,7 @@ class test_indicator_null extends \core_analytics\local\indicator\binary {
*
* @return \lang_string
*/
public static function get_name() : \lang_string {
public static function get_name(): \lang_string {
// Using a string that exists and contains a corresponding '_help' string.
return new \lang_string('allowstealthmodules');
}
+1 -1
View File
@@ -42,7 +42,7 @@ class test_indicator_random extends \core_analytics\local\indicator\linear {
*
* @return \lang_string
*/
public static function get_name() : \lang_string {
public static function get_name(): \lang_string {
// Using a string that exists and contains a corresponding '_help' string.
return new \lang_string('allowstealthmodules');
}
+1 -1
View File
@@ -47,7 +47,7 @@ class test_static_target_shortname extends test_target_shortname {
*
* @return \lang_string
*/
public static function get_name() : \lang_string {
public static function get_name(): \lang_string {
// Using a string that exists and contains a corresponding '_help' string.
return new \lang_string('allowstealthmodules');
}
+1 -1
View File
@@ -53,7 +53,7 @@ class test_target_course_users extends test_target_site_users {
*
* @return \lang_string
*/
public static function get_name() : \lang_string {
public static function get_name(): \lang_string {
// Using a string that exists and contains a corresponding '_help' string.
return new \lang_string('adminhelpedituser');
}
+1 -1
View File
@@ -42,7 +42,7 @@ class test_target_shortname extends \core_analytics\local\target\binary {
*
* @return \lang_string
*/
public static function get_name() : \lang_string {
public static function get_name(): \lang_string {
// Using a string that exists and contains a corresponding '_help' string.
return new \lang_string('allowstealthmodules');
}
@@ -42,7 +42,7 @@ class test_target_shortname_multiclass extends \core_analytics\local\target\disc
*
* @return \lang_string
*/
public static function get_name() : \lang_string {
public static function get_name(): \lang_string {
// Using a string that exists and contains a corresponding '_help' string.
return new \lang_string('allowstealthmodules');
}
@@ -205,7 +205,7 @@ class test_target_shortname_multiclass extends \core_analytics\local\target\disc
* @param \core_analytics\local\time_splitting\base $timesplitting
* @return bool
*/
public function can_use_timesplitting(\core_analytics\local\time_splitting\base $timesplitting):bool {
public function can_use_timesplitting(\core_analytics\local\time_splitting\base $timesplitting): bool {
return true;
}
}
+1 -1
View File
@@ -44,7 +44,7 @@ class test_target_site_users extends \core_analytics\local\target\binary {
*
* @return \lang_string
*/
public static function get_name() : \lang_string {
public static function get_name(): \lang_string {
// Using a string that exists and contains a corresponding '_help' string.
return new \lang_string('adminhelplogs');
}
+1 -1
View File
@@ -46,7 +46,7 @@ class test_timesplitting_seconds extends \core_analytics\local\time_splitting\pa
*
* @return \lang_string
*/
public static function get_name() : \lang_string {
public static function get_name(): \lang_string {
return new \lang_string('error');
}
}
@@ -46,7 +46,7 @@ class test_timesplitting_upcoming_seconds extends \core_analytics\local\time_spl
*
* @return \lang_string
*/
public static function get_name() : \lang_string {
public static function get_name(): \lang_string {
return new \lang_string('error');
}
}