This commit is contained in:
Andrew Nicols 2020-01-16 12:10:31 +08:00
commit 4aa4d44a41
3 changed files with 6 additions and 6 deletions

View file

@ -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.

View file

@ -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");
}
}

View file

@ -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();
}