INFRA-132 - Docblock @param and @return tag fixes
[civicrm-core.git] / CRM / Core / Config.php
index 1beaabadb35729588d129d5028547378c281812e..3060cc137e469557fc31a8e77d09c55b7b142f1a 100644 (file)
@@ -187,8 +187,10 @@ class CRM_Core_Config extends CRM_Core_Config_Variables {
   /**
    * Singleton function used to manage this object.
    *
-   * @param $loadFromDB boolean  whether to load from the database
-   * @param $force      boolean  whether to force a reconstruction
+   * @param bool $loadFromDB
+   *   whether to load from the database.
+   * @param bool $force
+   *   whether to force a reconstruction.
    *
    * @return CRM_Core_Config
    * @static
@@ -404,7 +406,6 @@ class CRM_Core_Config extends CRM_Core_Config_Variables {
    * Initialize the DataObject framework
    *
    * @return void
-   * @access private
    */
   private function _initDAO() {
     CRM_Core_DAO::init($this->dsn);
@@ -421,7 +422,6 @@ class CRM_Core_Config extends CRM_Core_Config_Variables {
    * Returns the singleton logger for the application
    *
    * @param
-   * @access private
    *
    * @return object
    */
@@ -437,7 +437,6 @@ class CRM_Core_Config extends CRM_Core_Config_Variables {
    * Initialize the config variables
    *
    * @return void
-   * @access private
    */
   private function _initVariables() {
     // retrieve serialised settings
@@ -485,7 +484,7 @@ class CRM_Core_Config extends CRM_Core_Config_Variables {
           $url = CRM_Utils_System::url('civicrm/admin/setting/path', 'reset=1');
           CRM_Core_Session::setStatus(ts('%1 has an incorrect directory path. Please go to the <a href="%2">path setting page</a> and correct it.', array(
             1 => $key,
-            2 => $url
+            2 => $url,
           )), ts('Check Settings'), 'alert');
         }
       }
@@ -528,7 +527,7 @@ class CRM_Core_Config extends CRM_Core_Config_Variables {
       $this->geocodeMethod = 'CRM_Utils_Geocode_' . $this->mapProvider;
     }
 
-    require_once (str_replace('_', DIRECTORY_SEPARATOR, $this->userFrameworkClass) . '.php');
+    require_once str_replace('_', DIRECTORY_SEPARATOR, $this->userFrameworkClass) . '.php';
     $class = $this->userFrameworkClass;
     // redundant with _setUserFrameworkConfig
     $this->userSystem = new $class();
@@ -537,8 +536,8 @@ class CRM_Core_Config extends CRM_Core_Config_Variables {
   /**
    * Retrieve a mailer to send any mail from the application
    *
-   * @param boolean $persist open a persistent smtp connection, should speed up mailings
-   * @access private
+   * @param bool $persist
+   *   Open a persistent smtp connection, should speed up mailings.
    * @return object
    */
   public static function &getMailer($persist = FALSE) {
@@ -616,9 +615,11 @@ class CRM_Core_Config extends CRM_Core_Config_Variables {
   /**
    * Create a new instance of a PEAR Mail driver
    *
-   * @param string $driver 'CRM_Mailing_BAO_Spool' or a name suitable for Mail::factory()
+   * @param string $driver
+   *   'CRM_Mailing_BAO_Spool' or a name suitable for Mail::factory().
    * @param array $params
-   * @return Mail (More specifically, a class which implements the "send()" function)
+   * @return object
+   *   More specifically, a class which implements the "send()" function
    */
   public static function _createMailer($driver, $params) {
     if ($driver == 'CRM_Mailing_BAO_Spool') {
@@ -654,7 +655,12 @@ class CRM_Core_Config extends CRM_Core_Config_Variables {
 
     // Whether we delete/create or simply preserve directories, we should
     // certainly make sure the restrictions are enforced.
-    foreach (array($this->templateCompileDir, $this->uploadDir, $this->configAndLogDir, $this->customFileUploadDir) as $dir) {
+    foreach (array(
+               $this->templateCompileDir,
+               $this->uploadDir,
+               $this->configAndLogDir,
+               $this->customFileUploadDir
+             ) as $dir) {
       if ($dir && is_dir($dir)) {
         CRM_Utils_File::restrictAccess($dir);
       }
@@ -665,11 +671,10 @@ class CRM_Core_Config extends CRM_Core_Config_Variables {
    * Verify that the needed parameters are not null in the config
    *
    * @param CRM_Core_Config (reference ) the system config object
-   * @param array           (reference ) the parameters that need a value
+   * @param array (reference ) the parameters that need a value
    *
    * @return boolean
    * @static
-   * @access public
    */
   public static function check(&$config, &$required) {
     foreach ($required as $name) {
@@ -742,7 +747,8 @@ class CRM_Core_Config extends CRM_Core_Config_Variables {
       $this->userPermissionClass->upgradePermissions(
         CRM_Core_Permission::basicPermissions()
       );
-    } else {
+    }
+    else {
       // Cannot store permissions -- warn if any modules require them
       $modules_with_perms = array();
       foreach ($module_files as $module_file) {
@@ -863,6 +869,8 @@ AND
   /**
    * Is back office credit card processing enabled for this site - ie are there any installed processors that support
    * it?
+   * This function is used for determining whether to show the submit credit card link, not for determining which processors to show, hence
+   * it is a config var
    * @return bool
    */
   public static function isEnabledBackOfficeCreditCardPayments() {