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/watermark/helpers/watermark.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/watermark/helpers/watermark.php') diff --git a/modules/watermark/helpers/watermark.php b/modules/watermark/helpers/watermark.php index 1e9b8990..2a32147d 100644 --- a/modules/watermark/helpers/watermark.php +++ b/modules/watermark/helpers/watermark.php @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class watermark_Core { - public static function get_add_form() { + static function get_add_form() { for ($i = 1; $i <= 100; $i++) { $range[$i] = $i; } @@ -36,7 +36,7 @@ class watermark_Core { return $form; } - public static function get_edit_form() { + static function get_edit_form() { for ($i = 1; $i <= 100; $i++) { $range[$i] = $i; } @@ -53,14 +53,14 @@ class watermark_Core { return $form; } - public static function get_delete_form() { + static function get_delete_form() { $form = new Forge("admin/watermarks/delete", "", "post"); $group = $form->group("delete_watermark")->label(t("Really delete Watermark?")); $group->submit("")->value(t("Delete")); return $form; } - public static function positions() { + static function positions() { return array("northwest" => t("Northwest"), "north" => t("North"), "northeast" => t("Northeast"), @@ -72,7 +72,7 @@ class watermark_Core { "southeast" => t("Southeast")); } - public static function position($key) { + static function position($key) { $positions = self::positions(); return $positions[$key]; } -- cgit v1.2.3