Merge branch 'phpunit-ob-fix' of https://github.com/giant-rabbit/civicrm-core into...
[civicrm-core.git] / CRM / Event / Import / Field.php
index d039d895013f508ad14766f0ed615f06b53ec577..e6a59724e2a069d052b0f5c56574ae0ab1be6b68 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
 */
+
+/**
+ * Class CRM_Event_Import_Field
+ */
 class CRM_Event_Import_Field {
 
   /**#@+
@@ -32,38 +36,46 @@ class CRM_Event_Import_Field {
    */
 
   /**
-   * name of the field
+   * Name of the field
    */
   public $_name;
 
   /**
-   * title of the field to be used in display
+   * Title of the field to be used in display
    */
   public $_title;
 
   /**
-   * type of field
+   * Type of field
    * @var enum
    */
   public $_type;
 
   /**
-   * regexp to match the CSV header of this column/field
+   * Regexp to match the CSV header of this column/field
    * @var string
    */
   public $_headerPattern;
 
   /**
-   * regexp to match the pattern of data from various column/fields
+   * Regexp to match the pattern of data from various column/fields
    * @var string
    */
   public $_dataPattern;
 
   /**
-   * value of this field
+   * Value of this field
    * @var object
    */
   public $_value;
+
+  /**
+   * @param string $name
+   * @param $title
+   * @param int $type
+   * @param string $headerPattern
+   * @param string $dataPattern
+   */
   function __construct($name, $title, $type = CRM_Utils_Type::T_INT, $headerPattern = '//', $dataPattern = '//') {
     $this->_name = $name;
     $this->_title = $title;
@@ -79,13 +91,16 @@ class CRM_Event_Import_Field {
   }
 
   /**
-   * the value is in string format. convert the value to the type of this field
+   * The value is in string format. convert the value to the type of this field
    * and set the field value with the appropriate type
    */
   function setValue($value) {
     $this->_value = $value;
   }
 
+  /**
+   * @return bool
+   */
   function validate() {
     if (CRM_Utils_System::isNull($this->_value)) {
       return TRUE;