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 bac15e5 commit 160133ce2411babe26fff535f64677061a0f67b7 @mudrd8mz mudrd8mz committed Aug 29, 2012
@@ -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);
@@ -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();
@@ -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 160133c

Please sign in to comment.