Merge pull request #4971 from kurund/batch-16
[civicrm-core.git] / CRM / Core / BAO / Website.php
index b9e05e0ae4fd71cbee4c3f09cf451964b8c9b2a5..28a93932e4c97d046cfa87d5944ff0f4f0208317 100644 (file)
@@ -41,13 +41,13 @@ class CRM_Core_BAO_Website extends CRM_Core_DAO_Website {
   /**
    * Takes an associative array and adds im
    *
-   * @param array  $params         (reference ) an assoc array of name/value pairs
+   * @param array $params
+   *   (reference ) an assoc array of name/value pairs.
    *
-   * @return object       CRM_Core_BAO_Website object on success, null otherwise
-   * @access public
-   * @static
+   * @return object
+   *   CRM_Core_BAO_Website object on success, null otherwise
    */
-  static function add(&$params) {
+  public static function add(&$params) {
     $hook = empty($params['id']) ? 'create' : 'edit';
     CRM_Utils_Hook::pre($hook, 'Website', CRM_Utils_Array::value('id', $params), $params);
 
@@ -62,16 +62,15 @@ class CRM_Core_BAO_Website extends CRM_Core_DAO_Website {
   /**
    * Process website
    *
-   * @param array $params associated array
-   * @param int $contactID contact id
+   * @param array $params
+   * @param int $contactID
+   *   Contact id.
    *
    * @param $skipDelete
    *
    * @return void
-   * @access public
-   * @static
    */
-  static function create(&$params, $contactID, $skipDelete) {
+  public static function create(&$params, $contactID, $skipDelete) {
     if (empty($params)) {
       return FALSE;
     }
@@ -113,12 +112,12 @@ class CRM_Core_BAO_Website extends CRM_Core_DAO_Website {
   /**
    * Delete website
    *
-   * @param array $ids website ids
+   * @param array $ids
+   *   Website ids.
    *
    * @return void
-   * @static
    */
-  static function del($ids) {
+  public static function del($ids) {
     $query = 'DELETE FROM civicrm_website WHERE id IN ( ' . implode(',', $ids) . ')';
     CRM_Core_DAO::executeQuery($query);
     // FIXME: we should return false if the del was unsuccessful
@@ -132,13 +131,11 @@ class CRM_Core_BAO_Website extends CRM_Core_DAO_Website {
    * @param array $params
    * @param $values
    *
-   * @return boolean
-   * @access public
-   * @static
+   * @return bool
    */
-  static function &getValues(&$params, &$values) {
-    $websites            = array();
-    $website             = new CRM_Core_DAO_Website();
+  public static function &getValues(&$params, &$values) {
+    $websites = array();
+    $website = new CRM_Core_DAO_Website();
     $website->contact_id = $params['contact_id'];
     $website->find();
 
@@ -157,15 +154,15 @@ class CRM_Core_BAO_Website extends CRM_Core_DAO_Website {
   /**
    * Get all the websites for a specified contact_id
    *
-   * @param int $id the contact id
+   * @param int $id
+   *   The contact id.
    *
    * @param bool $updateBlankLocInfo
    *
-   * @return array  the array of website details
-   * @access public
-   * @static
+   * @return array
+   *   the array of website details
    */
-  static function allWebsites($id, $updateBlankLocInfo = FALSE) {
+  public static function allWebsites($id, $updateBlankLocInfo = FALSE) {
     if (!$id) {
       return NULL;
     }
@@ -177,8 +174,8 @@ SELECT  id, website_type_id
     $params = array(1 => array($id, 'Integer'));
 
     $websites = $values = array();
-    $dao      = CRM_Core_DAO::executeQuery($query, $params);
-    $count    = 1;
+    $dao = CRM_Core_DAO::executeQuery($query, $params);
+    $count = 1;
     while ($dao->fetch()) {
       $values = array(
         'id' => $dao->id,
@@ -195,4 +192,3 @@ SELECT  id, website_type_id
     return $websites;
   }
 }
-