From 1c0748933407e5e2d656451c56a4428edad9d373 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Tue, 16 Sep 2008 06:13:31 +0000 Subject: [PATCH] Fixed documentation. Don't use empty() to determine if an array has zero length, that's not what it does. --- includes/filerepo/RepoGroup.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/includes/filerepo/RepoGroup.php b/includes/filerepo/RepoGroup.php index 265a8dc905..3f3181370e 100644 --- a/includes/filerepo/RepoGroup.php +++ b/includes/filerepo/RepoGroup.php @@ -177,9 +177,11 @@ class RepoGroup { } /** - * Run a function across all foreign repos. - * @param $callback string Name of method to call - * @param $params array Optional params to pass to the function + * Call a function for each foreign repo, with the repo object as the + * first parameter. + * + * @param $callback callback The function to call + * @param $params array Optional additional parameters to pass to the function */ function forEachForeignRepo( $callback, $params = array() ) { foreach( $this->foreignRepos as $repo ) { @@ -192,11 +194,11 @@ class RepoGroup { } /** - * Does the installation have foreign repos set up? + * Does the installation have any foreign repos set up? * @return bool */ function hasForeignRepos() { - return !empty( $this->foreignRepos ); + return (bool)$this->foreignRepos; } /** -- 2.20.1