[evolvis-commits] r8134: cleaned up phpdoc and tabs↵
mirabilos at evolvis.org
mirabilos at evolvis.org
Thu Feb 24 15:58:04 CET 2011
Author: mirabilos
Date: 2011-02-24 15:58:04 +0100 (Thu, 24 Feb 2011)
New Revision: 8134
Modified:
trunk/gforge_base/evolvisforge-5.1/gforge/common/pm/Validator.class
Log:
cleaned up phpdoc and tabs
Modified: trunk/gforge_base/evolvisforge-5.1/gforge/common/pm/Validator.class
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/common/pm/Validator.class 2011-02-24 14:58:03 UTC (rev 8133)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/common/pm/Validator.class 2011-02-24 14:58:04 UTC (rev 8134)
@@ -22,32 +22,40 @@
*
*/
class Validator {
- var $badfields;
+ var $badfields;
- /**
- * Checks to see if a field is null; if so, the field name is added to an internal array
- */
- function check($field, $name) {
- if (!$field) {
- $this->badfields[] = $name;
- }
- }
+ /**
+ * Checks to see if a field is null; if so, the field name is added to an internal array
+ *
+ * @param field - a variable to check for null
+ * @param name - the variable name
+ */
+ function check($field, $name) {
+ if (!$field) {
+ $this->badfields[] = $name;
+ }
+ }
- /**
- * Returns true if no null fields have been checked so far
- */
- function isClean() {
- return count($this->badfields) == 0;
- }
-
- /**
- * Returns an error message which contains the null field names which have been checked
- */
- function formErrorMsg($preamble) {
- foreach ($this->badfields as $field) {
- $preamble = $preamble.$field.",";
- }
- return substr($preamble, 0, strlen($preamble)-1);
- }
+ /**
+ * Returns true if no null fields have been checked so far
+ *
+ * @return boolean - True if there are no null fields so far
+ */
+ function isClean() {
+ return count($this->badfields) == 0;
+ }
+
+ /**
+ * Returns an error message which contains the null field names which have been checked
+ *
+ * @param preamble string - A string with which to start the error message
+ * @return string - A complete error message
+ */
+ function formErrorMsg($preamble) {
+ foreach ($this->badfields as $field) {
+ $preamble = $preamble.$field.",";
+ }
+ return substr($preamble, 0, strlen($preamble)-1);
+ }
}
?>
More information about the evolvis-commits
mailing list