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 --- modules/search/helpers/search_block.php | 2 +- modules/search/helpers/search_installer.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/search/helpers') diff --git a/modules/search/helpers/search_block.php b/modules/search/helpers/search_block.php index 0294c920..e390b9fc 100644 --- a/modules/search/helpers/search_block.php +++ b/modules/search/helpers/search_block.php @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class search_block_Core { - public static function header_top($theme) { + static function header_top($theme) { $view = new View("search_link.html"); return $view->render(); } diff --git a/modules/search/helpers/search_installer.php b/modules/search/helpers/search_installer.php index 24efe35a..7dc4c39a 100644 --- a/modules/search/helpers/search_installer.php +++ b/modules/search/helpers/search_installer.php @@ -18,14 +18,14 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class search_installer { - public static function install() { + static function install() { $version = module::get_version("search"); if ($version == 0) { module::set_version("search", 1); } } - public static function uninstall() { + static function uninstall() { module::delete("search"); } } -- cgit v1.2.3