Commit 72aac063 authored by Peter Burnett's avatar Peter Burnett
Browse files

MDL-59562 core: updated type hint of new function

parent 4fac690a
......@@ -927,9 +927,9 @@ class core_plugin_manager {
*
* @param \core\plugininfo\base $plugin the plugin we are checking
* @param int $branch the moodle branch to check support for
* @return bool
* @return string
*/
public function check_explicitly_supported($plugin, $branch) : bool {
public function check_explicitly_supported($plugin, $branch) : string {
// Check for correctly formed supported.
if (isset($plugin->pluginsupported)) {
// Broken apart for readability.
......
......@@ -254,7 +254,7 @@ abstract class base {
if (is_array($plugin->supported) && $isint && $isrange) {
$this->pluginsupported = $plugin->supported;
} else {
throw new coding_exception('Incorrect syntax in $plugin->supported in '."$this->name");
throw new coding_exception('Incorrect syntax in plugin supported declaration in '."$this->name");
}
}
......@@ -262,7 +262,7 @@ abstract class base {
if ((ctype_digit($plugin->incompatible) || is_int($plugin->incompatible)) && (int) $plugin->incompatible > 0) {
$this->pluginincompatible = intval($plugin->incompatible);
} else {
throw new coding_exception('Incorrect syntax in $plugin->incompatible in '."$this->name");
throw new coding_exception('Incorrect syntax in plugin incompatible declaration in '."$this->name");
}
}
......
......@@ -81,7 +81,7 @@ class base_testcase extends \advanced_testcase {
$pluginman->add_fake_plugin_info($plugininfo);
$this->expectException(\coding_exception::class);
$this->expectExceptionMessage('Incorrect syntax in $plugin->supported in example');
$this->expectExceptionMessage('Incorrect syntax in plugin supported declaration in example');
$plugininfo->load_disk_version();
}
......@@ -147,7 +147,7 @@ class base_testcase extends \advanced_testcase {
$pluginman->add_fake_plugin_info($plugininfo);
$this->expectException(\coding_exception::class);
$this->expectExceptionMessage('Incorrect syntax in $plugin->incompatible in example');
$this->expectExceptionMessage('Incorrect syntax in plugin incompatible declaration in example');
$plugininfo->load_disk_version();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment