MDL-59562 core: updated type hint of new function
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user