INFRA-132 - Comment grammar cleanup
[civicrm-core.git] / CRM / Core / BAO / CustomOption.php
index 07f3172a511c75568a85f30ff6c4c1d571f55b4f..5bb4b39c1dd66c54d9358c3ca1534592d3544d59 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -42,14 +42,15 @@ class CRM_Core_BAO_CustomOption {
   /**
    * Fetch object based on array of properties
    *
-   * @param array $params   (reference ) an assoc array of name/value pairs
-   * @param array $defaults (reference ) an assoc array to hold the flattened values
+   * @param array $params
+   *   (reference ) an assoc array of name/value pairs.
+   * @param array $defaults
+   *   (reference ) an assoc array to hold the flattened values.
    *
    * @return CRM_Core_BAO_CustomOption object
-   * @access public
    * @static
    */
-  static function retrieve(&$params, &$defaults) {
+  public static function retrieve(&$params, &$defaults) {
     $customOption = new CRM_Core_DAO_OptionValue();
     $customOption->copyValues($params);
     if ($customOption->find(TRUE)) {
@@ -62,8 +63,10 @@ class CRM_Core_BAO_CustomOption {
   /**
    * Returns all active options ordered by weight for a given field
    *
-   * @param int $fieldID field whose options are needed
-   * @param  boolean $inactiveNeeded do we need inactive options ?
+   * @param int $fieldID
+   *   Field whose options are needed.
+   * @param bool $inactiveNeededDo we need inactive options ?.
+   *   Do we need inactive options ?.
    *
    * @return array $customOption all active options for fieldId
    * @static
@@ -107,17 +110,19 @@ class CRM_Core_BAO_CustomOption {
    * Returns the option label for a custom field with a specific value. Handles all
    * custom field data and html types
    *
-   * @param $fieldId  int    the custom field ID
+   * @param int $fieldId
+   *   the custom field ID.
    * @pram  $value    string the value (typically from the DB) of this custom field
    * @param $value
-   * @param $htmlType string the html type of the field (optional)
-   * @param $dataType string the data type of the field (optional)
+   * @param string $htmlType
+   *   the html type of the field (optional).
+   * @param string $dataType
+   *   the data type of the field (optional).
    *
    * @return string          the label to display for this custom field
    * @static
-   * @access public
    */
-  static function getOptionLabel($fieldId, $value, $htmlType = NULL, $dataType = NULL) {
+  public static function getOptionLabel($fieldId, $value, $htmlType = NULL, $dataType = NULL) {
     if (!$fieldId) {
       return NULL;
     }
@@ -166,9 +171,8 @@ WHERE  id = %1
    * param $optionId integer option id
    *
    * @static
-   * @access public
    */
-  static function del($optionId) {
+  public static function del($optionId) {
     // get the customFieldID
     $query = "
 SELECT f.id as id, f.data_type as dataType
@@ -212,7 +216,7 @@ WHERE  id = %1";
    *
    * @throws Exception
    */
-  static function updateCustomValues($params) {
+  public static function updateCustomValues($params) {
     $optionDAO = new CRM_Core_DAO_OptionValue();
     $optionDAO->id = $params['optionId'];
     $optionDAO->find(TRUE);
@@ -267,7 +271,8 @@ WHERE  id = %2";
           $query     = "
 UPDATE {$dao->tableName}
 SET    {$dao->columnName} = REPLACE( {$dao->columnName}, %1, %2 )";
-          $queryParams = array(1 => array($oldString, 'String'),
+          $queryParams = array(
+          1 => array($oldString, 'String'),
             2 => array($newString, 'String'),
           );
           break;
@@ -285,7 +290,7 @@ SET    {$dao->columnName} = REPLACE( {$dao->columnName}, %1, %2 )";
    *
    * @return array
    */
-  static function valuesByID($customFieldID, $optionGroupID = NULL) {
+  public static function valuesByID($customFieldID, $optionGroupID = NULL) {
     if (!$optionGroupID) {
       $optionGroupID = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomField',
         $customFieldID,
@@ -300,4 +305,3 @@ SET    {$dao->columnName} = REPLACE( {$dao->columnName}, %1, %2 )";
     return $options;
   }
 }
-