From f3ba69c1d67c425ffa180d082a373e5cce0c86ce Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 14 Jan 2009 04:12:02 +0000 Subject: Make sure that helper functions are all static. Add new File_Structure_Test to make sure we don't regress. According to the PHP docs, the "public" keyword is implied on static functions, so remove it. Also, require private static functions to start with an _. http://php.net/manual/en/language.oop5.visibility.php --- core/helpers/core_dashboard.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/helpers/core_dashboard.php') diff --git a/core/helpers/core_dashboard.php b/core/helpers/core_dashboard.php index 2e017351..8efba3ea 100644 --- a/core/helpers/core_dashboard.php +++ b/core/helpers/core_dashboard.php @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class core_dashboard_Core { - public static function get_list() { + static function get_list() { return array( "welcome" => t("Welcome to Gallery 3!"), "photo_stream" => t("Photo Stream"), @@ -28,7 +28,7 @@ class core_dashboard_Core { "project_news" => t("Gallery Project News")); } - public static function get_block($block_id) { + static function get_block($block_id) { $block = new Block(); switch($block_id) { case "welcome": -- cgit v1.2.3