Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-34725 Make the signatures of process_legacy_element() method cons…

…istent

The patch fixes the missing parameter type declaration in all subclasses
of the moodle1_workshopform_handler class.
  • Loading branch information...
commit 160133ce2411babe26fff535f64677061a0f67b7 1 parent bac15e5
@mudrd8mz mudrd8mz authored
View
7 mod/workshop/form/comments/backup/moodle1/lib.php
@@ -32,8 +32,13 @@ class moodle1_workshopform_comments_handler extends moodle1_workshopform_handler
/**
* Converts <ELEMENT> into <workshopform_comments_dimension>
+ *
+ * @param array $data legacy element data
+ * @param array $raw raw element data
+ *
+ * @return array converted
*/
- public function process_legacy_element($data, $raw) {
+ public function process_legacy_element(array $data, array $raw) {
// prepare a fake record and re-use the upgrade logic
$fakerecord = (object)$data;
$converted = (array)workshopform_comments_upgrade_element($fakerecord, 12345678);
View
5 mod/workshop/form/numerrors/backup/moodle1/lib.php
@@ -49,9 +49,12 @@ public function on_elements_start() {
/**
* Converts <ELEMENT> into <workshopform_numerrors_dimension> and stores it for later writing
*
+ * @param array $data legacy element data
+ * @param array $raw raw element data
+ *
* @return array to be written to workshop.xml
*/
- public function process_legacy_element($data, $raw) {
+ public function process_legacy_element(array $data, array $raw) {
$workshop = $this->parenthandler->get_current_workshop();
View
5 mod/workshop/form/rubric/backup/moodle1/lib.php
@@ -46,8 +46,11 @@ public function on_elements_start() {
/**
* Processes one <ELEMENT>
+ *
+ * @param array $data legacy element data
+ * @param array $raw raw element data
*/
- public function process_legacy_element($data, $raw) {
+ public function process_legacy_element(array $data, array $raw) {
$this->elements[] = $data;
$this->rubrics[$data['id']] = array();
}
Please sign in to comment.
Something went wrong with that request. Please try again.