Also other code refinements. Credit to Mark Nelson.
$match = false;
if (count($range) != 2) {
- throw \coding_exception('classify_value() $ranges array param should contain 2 items, the predicate ' .
+ throw new \coding_exception('classify_value() $ranges array param should contain 2 items, the predicate ' .
'e.g. greater (gt), lower or equal (le)... and the value.');
}
*
* @param bool $enabled
* @param bool $trained
- * @param \context $predictioncontext
+ * @param \context|false $predictioncontext
* @return \core_analytics\model[]
*/
public static function get_all_models($enabled = false, $trained = false, $predictioncontext = false) {
/**
* Return all system predictions processors.
*
- * @return \core_analytics\predictor
+ * @return \core_analytics\predictor[]
*/
public static function get_all_prediction_processors() {
if (!$target) {
return false;
}
- $analyser = $this->get_target();
$classname = $target->get_analyser_class();
if (!class_exists($classname)) {
$classname = $target->get_analyser_class();
if (!class_exists($classname)) {
- throw \coding_exception($classname . ' class does not exists');
+ throw new \coding_exception($classname . ' class does not exists');
}
// Returns a \core_analytics\local\analyser\base class.