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/akismet/helpers/akismet_event.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/akismet/helpers/akismet_event.php') diff --git a/modules/akismet/helpers/akismet_event.php b/modules/akismet/helpers/akismet_event.php index c18b217b..1f4d53d5 100644 --- a/modules/akismet/helpers/akismet_event.php +++ b/modules/akismet/helpers/akismet_event.php @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class akismet_event_Core { - public static function comment_created($comment) { + static function comment_created($comment) { switch(akismet::check_comment($comment)) { case "spam": $comment->state = "spam"; @@ -36,7 +36,7 @@ class akismet_event_Core { $comment->save(); } - public static function comment_changed($old, $new) { + static function comment_changed($old, $new) { if ($old->state != "spam" && $new->state == "spam") { akismet::submit_spam($new); } else if ($old->state == "spam" && $new->state != "spam") { -- cgit v1.2.3