Minor - don't return bool in constructors.

pull/2487/head
jmontoyaa 7 years ago
parent cde9981c47
commit 0b887ad528
  1. 6
      main/lp/scormItem.class.php
  2. 4
      main/lp/scormMetadata.class.php
  3. 12
      main/lp/scormOrganization.class.php

@ -43,7 +43,7 @@ class scormItem extends learnpathItem
parent::__construct($element, api_get_user_id(), $course_id);
$this->scorm_contact = false;
// TODO: Implement this way of metadata object creation.
return false;
break;
case 'manifest': // Do the same as the default.
default:
//if ($first_item->type == XML_ELEMENT_NODE) this is already check prior to the call to this function.
@ -135,13 +135,9 @@ class scormItem extends learnpathItem
}
}
}
return true;
}
// End parsing using PHP5 DOMXML methods.
}
return false;
}
/**

@ -34,7 +34,7 @@ class scormMetadata
switch ($type) {
case 'db':
// TODO: Implement this way of metadata object creation.
return false;
break;
//break;
case 'manifest': // Do the same as the default.
$children = $element->childNodes;
@ -93,11 +93,9 @@ class scormMetadata
}
}
}
return true;
//break;
}
// End parsing using PHP5 DOMXML methods.
}
return false;
}
}

@ -4,7 +4,7 @@
/**
* Container for the scormOrganization class
* @package chamilo.learnpath.scorm
* @author Yannick Warnier <ywarnier@beeznest.org>
* @author Yannick Warnier <ywarnier@beeznest.org>
*/
/**
@ -15,7 +15,7 @@ class scormOrganization
public $identifier = '';
public $structure = '';
public $title = '';
public $items = array();
public $items = [];
public $metadata;
/**
@ -32,10 +32,9 @@ class scormOrganization
switch ($type) {
case 'db':
// TODO: Implement this way of metadata object creation.
return false;
break;
case 'manifest': // Do the same as the default.
default:
// if ($first_item->type == XML_ELEMENT_NODE)
// this is already check prior to the call to this function.
$children = $element->childNodes;
foreach ($children as $child) {
@ -90,14 +89,9 @@ class scormOrganization
}
}
}
return true;
}
// End parsing using PHP5 DOMXML methods.
}
return false;
}
/**

Loading…
Cancel
Save