Merge pull request #4962 from totten/master-angular-ts
[civicrm-core.git] / CRM / Core / BAO / Setting.php
index aca2dbbf1f89863df3622c1040b1872a4beeb994..f42e66c6f98d669ea54e30e687285f4204205970 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -79,10 +79,10 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting {
    * @param int $domainID
    * @param bool $force
    *
-   * @return boolean
+   * @return bool
    *   true if item is already in cache
    */
-  static function inCache(
+  public static function inCache(
     $group,
     $name,
     $componentID = NULL,
@@ -133,7 +133,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting {
    *
    * @return string
    */
-  static function setCache(
+  public static function setCache(
     $values,
     $group,
     $componentID = NULL,
@@ -163,7 +163,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting {
    *
    * @return CRM_Core_DAO_Domain|CRM_Core_DAO_Setting
    */
-  static function dao(
+  public static function dao(
     $group,
     $name = NULL,
     $componentID = NULL,
@@ -219,7 +219,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting {
    * @return mixed
    *   The data if present in the setting table, else null
    */
-  static function getItem(
+  public static function getItem(
     $group,
     $name = NULL,
     $componentID = NULL,
@@ -304,15 +304,14 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting {
           }
         }
         else {
-          $setting =
-            CRM_Core_BAO_Setting::getItem(
-              $fields['values'][$name]['group_name'],
-              $name,
-              CRM_Utils_Array::value('component_id', $params),
-              NULL,
-              CRM_Utils_Array::value('contact_id', $params),
-              $domainID
-            );
+          $setting = CRM_Core_BAO_Setting::getItem(
+            $fields['values'][$name]['group_name'],
+            $name,
+            CRM_Utils_Array::value('component_id', $params),
+            NULL,
+            CRM_Utils_Array::value('contact_id', $params),
+            $domainID
+          );
         }
         if (!is_null($setting)) {
           // we won't return if not set - helps in return all scenario - otherwise we can't indentify the missing ones
@@ -346,7 +345,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting {
    *
    * @return void
    */
-  static function setItem(
+  public static function setItem(
     $value,
     $group,
     $name,
@@ -380,7 +379,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting {
    * @param int $createdID
    * @param int $domainID
    */
-  static function _setItem(
+  public static function _setItem(
     $metadata,
     $value,
     $group,
@@ -637,16 +636,16 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting {
    *
    * @return array
    *   the following information as appropriate for each setting
-   * - name
-   * - type
-   * - default
-   * - add (CiviCRM version added)
-   * - is_domain
-   * - is_contact
-   * - description
-   * - help_text
+   *   - name
+   *   - type
+   *   - default
+   *   - add (CiviCRM version added)
+   *   - is_domain
+   *   - is_contact
+   *   - description
+   *   - help_text
    */
-  static function getSettingSpecification(
+  public static function getSettingSpecification(
     $componentID = NULL,
     $filters = array(),
     $domainID = NULL,
@@ -832,7 +831,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting {
    *
    * @return array
    */
-  static function valueOptions(
+  public static function valueOptions(
     $group,
     $name,
     $system = TRUE,
@@ -891,7 +890,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting {
    * @param int $userID
    * @param string $keyField
    */
-  static function setValueOption(
+  public static function setValueOption(
     $group,
     $name,
     $value,
@@ -1111,7 +1110,7 @@ AND domain_id = %3
   /**
    * Civicrm_setting didn't exist before 4.1.alpha1 and this function helps taking decisions during upgrade
    *
-   * @return boolean
+   * @return bool
    */
   public static function isUpgradeFromPreFourOneAlpha1() {
     if (CRM_Core_Config::isUpgradeMode()) {
@@ -1122,4 +1121,5 @@ AND domain_id = %3
     }
     return FALSE;
   }
+
 }