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/info/helpers/info_block.php | 4 ++-- modules/info/helpers/info_installer.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/info/helpers') diff --git a/modules/info/helpers/info_block.php b/modules/info/helpers/info_block.php index 46e2bd72..3bc51c73 100644 --- a/modules/info/helpers/info_block.php +++ b/modules/info/helpers/info_block.php @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class info_block_Core { - public static function sidebar_blocks($theme) { + static function sidebar_blocks($theme) { if ($theme->item()) { $block = new Block(); $block->css_id = "gMetadata"; @@ -28,7 +28,7 @@ class info_block_Core { } } - public static function thumb_info($theme, $item) { + static function thumb_info($theme, $item) { $results = ""; if ($item->view_count) { $results .= "
  • "; diff --git a/modules/info/helpers/info_installer.php b/modules/info/helpers/info_installer.php index 747fc639..1c6cef95 100644 --- a/modules/info/helpers/info_installer.php +++ b/modules/info/helpers/info_installer.php @@ -18,14 +18,14 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class info_installer { - public static function install() { + static function install() { $version = module::get_version("info"); if ($version == 0) { module::set_version("info", 1); } } - public static function uninstall() { + static function uninstall() { module::delete("info"); } } -- cgit v1.2.3