Permalink
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...
1 parent d71c486 commit b615c46821ed03bc5d2f9eb05231c089415fc9f7 @mudrd8mz mudrd8mz committed Aug 29, 2012
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();
}

0 comments on commit b615c46

Please sign in to comment.