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
@@ -39,7 +39,7 @@ class provider implements
* @param collection $collection The initialised collection to add items to.
* @return collection A listing of user data stored through this system.
*/
public static function get_metadata(collection $collection) : collection {
public static function get_metadata(collection $collection): collection {
$collection->add_database_table('xapi_states', [
'component' => 'privacy:metadata:component',
'userid' => 'privacy:metadata:userid',
+2 -2
View File
@@ -73,7 +73,7 @@ class delete_state_test extends externallib_advanced_testcase {
*
* @return array
*/
public function components_provider() : array {
public function components_provider(): array {
return [
'Inexistent component' => [
'component' => 'inexistent_component',
@@ -150,7 +150,7 @@ class delete_state_test extends externallib_advanced_testcase {
*
* @return array
*/
public function states_provider() : array {
public function states_provider(): array {
return [
'Existing and valid state' => [
'info' => [],
+2 -2
View File
@@ -74,7 +74,7 @@ class get_state_test extends externallib_advanced_testcase {
*
* @return array
*/
public function components_provider() : array {
public function components_provider(): array {
return [
'Inexistent component' => [
'component' => 'inexistent_component',
@@ -150,7 +150,7 @@ class get_state_test extends externallib_advanced_testcase {
*
* @return array
*/
public function states_provider() : array {
public function states_provider(): array {
return [
'Existing and valid state' => [
'info' => [],
+1 -1
View File
@@ -145,7 +145,7 @@ class get_states_test extends externallib_advanced_testcase {
*
* @return array
*/
public function components_provider() : array {
public function components_provider(): array {
return [
'Inexistent component' => [
'component' => 'inexistent_component',
+2 -2
View File
@@ -72,7 +72,7 @@ class post_state_test extends externallib_advanced_testcase {
*
* @return array
*/
public function components_provider() : array {
public function components_provider(): array {
return [
'Inexistent component' => [
'component' => 'inexistent_component',
@@ -135,7 +135,7 @@ class post_state_test extends externallib_advanced_testcase {
*
* @return array
*/
public function states_provider() : array {
public function states_provider(): array {
return [
'Empty stateid' => [
'stateid' => '',
+4 -4
View File
@@ -187,7 +187,7 @@ class post_statement_test extends externallib_advanced_testcase {
*
* @return array
*/
public function components_provider() : array {
public function components_provider(): array {
return [
'Inexistent component' => [
'inexistent_component', []
@@ -233,7 +233,7 @@ class post_statement_test extends externallib_advanced_testcase {
*
* @return array
*/
public function invalid_json_provider() : array {
public function invalid_json_provider(): array {
return [
'Wrong json' => [
'This is not { a json object /'
@@ -376,7 +376,7 @@ class post_statement_test extends externallib_advanced_testcase {
*
* @return array
*/
public function statement_provider() : array {
public function statement_provider(): array {
return [
// Single statement with group statements enabled.
'Single, Valid actor, valid verb' => [
@@ -449,7 +449,7 @@ class post_statement_test extends externallib_advanced_testcase {
*
* @return array
*/
public function group_statement_provider() : array {
public function group_statement_provider(): array {
return [
// Single statement with group statements enabled.
'Group statement + group statement without group support' => [
+2 -2
View File
@@ -76,7 +76,7 @@ class iri_test extends advanced_testcase {
*
* @return array
*/
public function iri_samples_provider() : array {
public function iri_samples_provider(): array {
global $CFG;
return [
@@ -120,7 +120,7 @@ class iri_test extends advanced_testcase {
*
* @return array
*/
public function iri_check_provider() : array {
public function iri_check_provider(): array {
return [
'Real IRI http' => [
'http://adlnet.gov/expapi/activities/example',
@@ -113,7 +113,7 @@ class item_activity_test extends advanced_testcase {
*
* @return array
*/
public function create_from_id_provider() : array {
public function create_from_id_provider(): array {
return [
'Fake IRI with no definition' => [
'paella', false,
@@ -155,7 +155,7 @@ class item_activity_test extends advanced_testcase {
*
* @return array
*/
public function invalid_data_provider() : array {
public function invalid_data_provider(): array {
return [
'Invalid Avtivity objectType' => [
'Invalid Type!', iri::generate('paella', 'activity'),
@@ -143,7 +143,7 @@ class item_agent_test extends advanced_testcase {
*
* @return array
*/
public function invalid_data_provider() : array {
public function invalid_data_provider(): array {
return [
'Wrong objecttype' => [
'Invalid', true, true
@@ -203,7 +203,7 @@ class item_agent_test extends advanced_testcase {
*
* @return array
*/
public function unspupported_create_provider() : array {
public function unspupported_create_provider(): array {
return [
'Both mbox and account' => [
true, true, false, false
@@ -94,7 +94,7 @@ class item_attachment_test extends advanced_testcase {
*
* @return array
*/
public function invalid_values_data() : array {
public function invalid_values_data(): array {
return [
'No usageType attachment' => [
'usageType', null
@@ -72,7 +72,7 @@ class item_definition_test extends advanced_testcase {
*
* @return array
*/
public function creation_provider() : array {
public function creation_provider(): array {
return [
'No interactionType' => [''],
'Choice' => ['choice'],
@@ -143,7 +143,7 @@ class item_group_test extends advanced_testcase {
*
* @return array
*/
public function invalid_data_provider() : array {
public function invalid_data_provider(): array {
return [
'Wrong objecttype' => [
'Invalid', true, true
@@ -117,7 +117,7 @@ class item_object_test extends advanced_testcase {
*
* @return array
*/
public function invalid_data_provider() : array {
public function invalid_data_provider(): array {
return [
'Empty or null id' => [
'',
@@ -98,7 +98,7 @@ class item_result_test extends advanced_testcase {
*
* @return array
*/
public function duration_values_data() : array {
public function duration_values_data(): array {
return [
'No duration' => [
null, null, false
@@ -75,7 +75,7 @@ class item_verb_test extends advanced_testcase {
*
* @return array
*/
public function create_from_id_provider() : array {
public function create_from_id_provider(): array {
return [
'Fake IRI' => [
'cook',
@@ -105,7 +105,7 @@ class item_verb_test extends advanced_testcase {
*
* @return array
*/
public function invalid_data_provider() : array {
public function invalid_data_provider(): array {
return [
'Empty or null id' => [
'',
+3 -3
View File
@@ -184,7 +184,7 @@ class statement_test extends advanced_testcase {
*
* @return array
*/
public function create_provider() : array {
public function create_provider(): array {
return [
'Agent statement with no extras' => [
true, [], []
@@ -413,7 +413,7 @@ class statement_test extends advanced_testcase {
*
* @return array
*/
public function invalid_gets_provider() : array {
public function invalid_gets_provider(): array {
return [
'Method get_user on empty statement' => ['get_user', true],
'Method get_all_users on empty statement' => ['get_all_users', true],
@@ -532,7 +532,7 @@ class statement_test extends advanced_testcase {
*
* @return array
*/
public function invalid_data_provider() : array {
public function invalid_data_provider(): array {
return [
'No actor, no verb, no object' => [false, false, false],
'No actor, verb, no object' => [false, true, false],
+3 -3
View File
@@ -113,7 +113,7 @@ class state_store_test extends advanced_testcase {
*
* @return array
*/
public function states_provider() : array {
public function states_provider(): array {
return [
'Existing and valid state' => [
'info' => [],
@@ -193,7 +193,7 @@ class state_store_test extends advanced_testcase {
*
* @return array
*/
public function put_states_provider() : array {
public function put_states_provider(): array {
return [
'Update existing state' => [
'info' => [],
@@ -334,7 +334,7 @@ class state_store_test extends advanced_testcase {
*
* @return array
*/
public function reset_wipe_states_provider() : array {
public function reset_wipe_states_provider(): array {
return [
'With fake_component' => [
'info' => [],