mirror of
https://github.com/silverstripe/silverstripe-environmentcheck
synced 2024-10-22 17:05:40 +02:00
MINOR Allowing to register checks for multiple suites in one call to avoid repetition
This commit is contained in:
parent
8b84150acd
commit
09ba044f5d
@ -111,10 +111,13 @@ class EnvironmentCheckSuite {
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a check against the named check suite
|
||||
* Register a check against the named check suite.
|
||||
*
|
||||
* @param String|Array
|
||||
*/
|
||||
static function register($name, $check, $title = null) {
|
||||
self::inst($name)->push($check, $title);
|
||||
static function register($names, $check, $title = null) {
|
||||
if(!is_array($names)) $names = array($names);
|
||||
foreach($names as $name) self::inst($name)->push($check, $title);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user