From 09ba044f5d95a089a7f11f4b8b4369dfb9eb36f4 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 20 Jan 2012 17:39:39 +0100 Subject: [PATCH] MINOR Allowing to register checks for multiple suites in one call to avoid repetition --- code/EnvironmentCheck.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/EnvironmentCheck.php b/code/EnvironmentCheck.php index 12d785e..2583048 100644 --- a/code/EnvironmentCheck.php +++ b/code/EnvironmentCheck.php @@ -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); } }