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
This commit is contained in:
Bharat Mediratta
2009-01-14 04:12:02 +00:00
parent 02af2d8b76
commit f3ba69c1d6
59 changed files with 280 additions and 257 deletions

View File

@@ -61,7 +61,7 @@ class group_Core {
return model_cache::get("group", 2);
}
public static function get_edit_form_admin($group) {
static function get_edit_form_admin($group) {
$form = new Forge("admin/groups/edit/$group->id");
$form_group = $form->group("edit_group")->label(t("Edit Group"));
$form_group->input("name")->label(t("Name"))->id("gName")->value($group->name);
@@ -72,7 +72,7 @@ class group_Core {
return $form;
}
public static function get_add_form_admin() {
static function get_add_form_admin() {
$form = new Forge("admin/groups/add");
$form_group = $form->group("add_group")->label(t("Add Group"));
$form_group->input("name")->label(t("Name"))->id("gName");
@@ -84,7 +84,7 @@ class group_Core {
return $form;
}
public static function get_delete_form_admin($group) {
static function get_delete_form_admin($group) {
$form = new Forge("admin/groups/delete/$group->id", "", "post");
$form_group = $form->group("delete_group")->label(
t("Are you sure you want to delete group {{group_name}}?", array("group_name" => $group->name)));