From 4461cf64654e82487468c331da27b23d4a0263a8 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 9 Oct 2005 17:15:30 +0000 Subject: [PATCH] r515: Added phpDoc comments --- includes/class_history.php | 39 ++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/includes/class_history.php b/includes/class_history.php index 8355408..a8c8148 100644 --- a/includes/class_history.php +++ b/includes/class_history.php @@ -12,14 +12,35 @@ class History { + /** + * Bug ID + * @var integer + */ var $bugid = 0; + + /** + * Attachment ID + * @var integer + */ var $attachmentid = 0; + + /** + * Comment ID + * @var integer + */ var $commentid = 0; + + /** + * Allow diff's that have an empty result (no change) + * @var bool + */ var $allowempty = false; - // ------------------------------------------------------------------- - // -- Create a log entry - // ------------------------------------------------------------------- + /** + * Logs a field change into the database + * + * @param array Diff data produced by diff() + */ function log($diffdata = null) { global $bugsys; @@ -49,9 +70,15 @@ class History ); } - // ------------------------------------------------------------------- - // -- Do a diff - // ------------------------------------------------------------------- + /** + * Compares two values and creates a report of their differences + * + * @param string Name of the field + * @param mixed Initial value + * @param mixed Final value + * + * @return array Difference report + */ function diff($field, $initial, $final) { if (empty($initial) AND empty($final)) -- 2.22.5