INFRA-132 - Civi - PHPStorm cleanup
[civicrm-core.git] / CRM / Core / CodeGen / Config.php
index de7ae4b99a6240a529be0e8f74bb3b8c84d1a291..086169ff5264670ca210f16821b85e118cb82803 100644 (file)
@@ -4,17 +4,17 @@
  * Generate configuration files
  */
 class CRM_Core_CodeGen_Config extends CRM_Core_CodeGen_BaseTask {
-  function run() {
+  public function run() {
     $this->generateTemplateVersion();
 
     $this->setupCms();
   }
 
-  function generateTemplateVersion() {
+  public function generateTemplateVersion() {
     file_put_contents($this->config->tplCodePath . "/CRM/common/version.tpl", $this->config->db_version);
   }
 
-  function setupCms() {
+  public function setupCms() {
     if (!in_array($this->config->cms, array(
       'drupal', 'joomla', 'wordpress'))) {
       echo "Config file for '{$this->config->cms}' not known.";
@@ -25,7 +25,8 @@ class CRM_Core_CodeGen_Config extends CRM_Core_CodeGen_BaseTask {
       if ($configTemplate) {
         echo "Generating civicrm.config.php\n";
         copy($configTemplate, '../civicrm.config.php');
-      } else {
+      }
+      else {
         throw new Exception("Failed to locate template for civicrm.config.php");
       }
     }
@@ -38,7 +39,8 @@ class CRM_Core_CodeGen_Config extends CRM_Core_CodeGen_BaseTask {
   }
 
   /**
-   * @param string $cms "drupal"|"wordpress"
+   * @param string $cms
+   *   "drupal"|"wordpress".
    * @return null|string path to config template
    */
   public function findConfigTemplate($cms) {
@@ -46,8 +48,9 @@ class CRM_Core_CodeGen_Config extends CRM_Core_CodeGen_BaseTask {
     switch ($cms) {
       case 'drupal':
         $candidates[] = "../drupal/civicrm.config.php.drupal";
-        $candidates[] =  "../../drupal/civicrm.config.php.drupal";
+        $candidates[] = "../../drupal/civicrm.config.php.drupal";
         break;
+
       case 'wordpress':
         $candidates[] = "../../civicrm.config.php.wordpress";
         $candidates[] = "../WordPress/civicrm.config.php.wordpress";