INFRA-132 - BraceOnNewLine. ContentAfterBrace. FirstIndexNoNewline.
[civicrm-core.git] / CRM / Contact / BAO / Individual.php
index 851bfc1845759151d1a618dfe1a64c0fa2978f2f..c62456aef3162a9e52ef27058fae796ba6117083 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -41,19 +41,21 @@ class CRM_Contact_BAO_Individual extends CRM_Contact_DAO_Contact {
   /**
    * This is a contructor of the class.
    */
-  function __construct() {}
+  public function __construct() {
+  }
 
   /**
    * Function is used to format the individual contact values
    *
-   * @param array  $params (reference ) an assoc array of name/value pairs
-   * @param array  $contact  contact object
+   * @param array $params
+   *   (reference ) an assoc array of name/value pairs.
+   * @param array $contact
+   *   Contact object.
    *
-   * @return object CRM_Contact_BAO_Contact object
-   * @access public
+   * @return CRM_Contact_BAO_Contact object
    * @static
    */
-  static function format(&$params, &$contact) {
+  public static function format(&$params, &$contact) {
     if (!self::dataExists($params)) {
       return;
     }
@@ -333,14 +335,16 @@ class CRM_Contact_BAO_Individual extends CRM_Contact_DAO_Contact {
   }
 
   /**
-   * regenerates display_name for contacts with given prefixes/suffixes
+   * Regenerates display_name for contacts with given prefixes/suffixes
    *
-   * @param array $ids     the array with the prefix/suffix id governing which contacts to regenerate
-   * @param int   $action  the action describing whether prefix/suffix was UPDATED or DELETED
+   * @param array $ids
+   *   The array with the prefix/suffix id governing which contacts to regenerate.
+   * @param int $action
+   *   The action describing whether prefix/suffix was UPDATED or DELETED.
    *
    * @return void
    */
-  static function updateDisplayNames(&$ids, $action) {
+  public static function updateDisplayNames(&$ids, $action) {
     // get the proper field name (prefix_id or suffix_id) and its value
     $fieldName = '';
     foreach ($ids as $key => $value) {
@@ -380,11 +384,12 @@ class CRM_Contact_BAO_Individual extends CRM_Contact_DAO_Contact {
   }
 
   /**
-   * creates display name
+   * Creates display name
    *
-   * @return string  the constructed display name
+   * @return string
+   *   the constructed display name
    */
-  function displayName() {
+  public function displayName() {
     $prefix = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'prefix_id');
     $suffix = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'suffix_id');
     return str_replace('  ', ' ', trim($prefix[$this->prefix_id] . ' ' . $this->first_name . ' ' . $this->middle_name . ' ' . $this->last_name . ' ' . $suffix[$this->suffix_id]));
@@ -393,13 +398,13 @@ class CRM_Contact_BAO_Individual extends CRM_Contact_DAO_Contact {
   /**
    * Check if there is data to create the object
    *
-   * @param array  $params         (reference ) an assoc array of name/value pairs
+   * @param array $params
+   *   (reference ) an assoc array of name/value pairs.
    *
    * @return boolean
-   * @access public
    * @static
    */
-  static function dataExists(&$params) {
+  public static function dataExists(&$params) {
     if ($params['contact_type'] == 'Individual') {
       return TRUE;
     }
@@ -407,4 +412,3 @@ class CRM_Contact_BAO_Individual extends CRM_Contact_DAO_Contact {
     return FALSE;
   }
 }
-