From 9c706bb48b634d85482ef37d24cd25a973fc7cba Mon Sep 17 00:00:00 2001 From: Jun Pataleta Date: Mon, 10 Jun 2024 13:17:11 +0800 Subject: [PATCH] MDL-81919 core: Minor fixes * Typo in Jerome Mouneyrac's name. * Remove other trailing commas in inline arrays. --- customfield/tests/category_controller_test.php | 2 +- customfield/tests/data_controller_test.php | 2 +- customfield/tests/field_controller_test.php | 2 +- lib/classes/exception/invalid_response_exception.php | 2 +- lib/classes/exception/webservice_parameter_exception.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/customfield/tests/category_controller_test.php b/customfield/tests/category_controller_test.php index 30ea870ac74..7da1bdf817d 100644 --- a/customfield/tests/category_controller_test.php +++ b/customfield/tests/category_controller_test.php @@ -197,7 +197,7 @@ final class category_controller_test extends \advanced_testcase { // Create the category. $params = ['component' => 'core_course', 'area' => 'course', 'itemid' => 0, 'name' => 'Cat1', - 'contextid' => \context_system::instance()->id, ]; + 'contextid' => \context_system::instance()->id]; $c1 = category_controller::create(0, (object)$params); $c1->save(); $this->assertNotEmpty($c1->get('id')); diff --git a/customfield/tests/data_controller_test.php b/customfield/tests/data_controller_test.php index 5523c658a27..81c99b2e8c5 100644 --- a/customfield/tests/data_controller_test.php +++ b/customfield/tests/data_controller_test.php @@ -130,7 +130,7 @@ final class data_controller_test extends \advanced_testcase { $field = $this->get_generator()->create_field(['categoryid' => $category->get('id')]); $course = $this->getDataGenerator()->create_course(); $data = data_controller::create(0, (object)['instanceid' => $course->id, - 'contextid' => \context_course::instance($course->id)->id, ], $field); + 'contextid' => \context_course::instance($course->id)->id], $field); $data->save(); $datarecord = $DB->get_record(\core_customfield\data::TABLE, ['id' => $data->get('id')], '*', MUST_EXIST); diff --git a/customfield/tests/field_controller_test.php b/customfield/tests/field_controller_test.php index afa5a2515b7..f95253bad66 100644 --- a/customfield/tests/field_controller_test.php +++ b/customfield/tests/field_controller_test.php @@ -233,7 +233,7 @@ final class field_controller_test extends \advanced_testcase { $category = $lpg->create_category(); $configdata = ['a' => 'b', 'c' => ['d', 'e']]; $field = field_controller::create(0, (object)['type' => 'text', - 'configdata' => json_encode($configdata), 'shortname' => 'a', 'name' => 'a', ], $category); + 'configdata' => json_encode($configdata), 'shortname' => 'a', 'name' => 'a'], $category); $field->save(); // Retrieve field and check configdata. diff --git a/lib/classes/exception/invalid_response_exception.php b/lib/classes/exception/invalid_response_exception.php index 05774f14e9f..42b57ae1566 100644 --- a/lib/classes/exception/invalid_response_exception.php +++ b/lib/classes/exception/invalid_response_exception.php @@ -24,7 +24,7 @@ namespace core\exception; * * @package core * @subpackage exception - * @copyright Jerome Mounerac + * @copyright Jerome Mouneyrac * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class invalid_response_exception extends moodle_exception { diff --git a/lib/classes/exception/webservice_parameter_exception.php b/lib/classes/exception/webservice_parameter_exception.php index 0efd5c2a084..d94744bde93 100644 --- a/lib/classes/exception/webservice_parameter_exception.php +++ b/lib/classes/exception/webservice_parameter_exception.php @@ -23,7 +23,7 @@ namespace core\exception; * The error string is gotten from webservice.php * @package core * @subpackage exception - * @copyright Jerome Mounerac + * @copyright Jerome Mouneyrac * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class webservice_parameter_exception extends moodle_exception {