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/slideshow/helpers/slideshow_block.php | 2 +- modules/slideshow/helpers/slideshow_installer.php | 4 ++-- modules/slideshow/helpers/slideshow_menu.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/slideshow') diff --git a/modules/slideshow/helpers/slideshow_block.php b/modules/slideshow/helpers/slideshow_block.php index bd1197ef..6a5a3f95 100644 --- a/modules/slideshow/helpers/slideshow_block.php +++ b/modules/slideshow/helpers/slideshow_block.php @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class slideshow_block_Core { - public static function head($theme) { + static function head($theme) { return ""; } diff --git a/modules/slideshow/helpers/slideshow_installer.php b/modules/slideshow/helpers/slideshow_installer.php index e505d32f..c62369ab 100644 --- a/modules/slideshow/helpers/slideshow_installer.php +++ b/modules/slideshow/helpers/slideshow_installer.php @@ -18,14 +18,14 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class slideshow_installer { - public static function install() { + static function install() { $version = module::get_version("slideshow"); if ($version == 0) { module::set_version("slideshow", 1); } } - public static function uninstall() { + static function uninstall() { module::delete("slideshow"); } } diff --git a/modules/slideshow/helpers/slideshow_menu.php b/modules/slideshow/helpers/slideshow_menu.php index 8cc0d7fe..0892ce89 100644 --- a/modules/slideshow/helpers/slideshow_menu.php +++ b/modules/slideshow/helpers/slideshow_menu.php @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class slideshow_menu_Core { - public static function album($menu, $theme) { + static function album($menu, $theme) { $menu ->append(Menu::factory("link") ->id("slideshow") @@ -27,7 +27,7 @@ class slideshow_menu_Core { ->css_id("gSlideshowLink")); } - public static function photo($menu, $theme) { + static function photo($menu, $theme) { $menu ->append(Menu::factory("link") ->id("slideshow") -- cgit v1.2.3