Merge pull request #4897 from totten/master-cleanup2
[civicrm-core.git] / CRM / Core / BAO / Website.php
index f30131bf1a93d5e81787752f196f83cf60f9567b..868382130e6630450a0792561fd8cebede022a53 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
 class CRM_Core_BAO_Website extends CRM_Core_DAO_Website {
 
   /**
-   * takes an associative array and adds im
+   * 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
+   * @return object
+   *   CRM_Core_BAO_Website object on success, null otherwise
    * @static
    */
-  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);
 
@@ -60,18 +61,19 @@ class CRM_Core_BAO_Website extends CRM_Core_DAO_Website {
   }
 
   /**
-   * process website
+   * Process website
    *
-   * @param array $params associated array
-   * @param int $contactID contact id
+   * @param array $params
+   *   Associated array.
+   * @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 +115,13 @@ 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
@@ -133,12 +136,11 @@ class CRM_Core_BAO_Website extends CRM_Core_DAO_Website {
    * @param $values
    *
    * @return boolean
-   * @access public
    * @static
    */
-  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 +159,16 @@ 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
+   * @return array
+   *   the array of website details
    * @static
    */
-  static function allWebsites($id, $updateBlankLocInfo = FALSE) {
+  public static function allWebsites($id, $updateBlankLocInfo = FALSE) {
     if (!$id) {
       return NULL;
     }
@@ -177,8 +180,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 +198,3 @@ SELECT  id, website_type_id
     return $websites;
   }
 }
-