INFRA-132 - CRM/ - PHPStorm cleanup
[civicrm-core.git] / CRM / Upgrade / Incremental / php / FourFive.php
index a94ec64cf5cca3d2a122c54b3fc7079a763a0d72..a8b451f529e37debe62116ddaf01a2865f48dfec 100644 (file)
@@ -50,7 +50,8 @@ class CRM_Upgrade_Incremental_php_FourFive {
    * revision to the database.
    *
    * @param $preUpgradeMessage
-   * @param $rev string, a version number, e.g. '4.4.alpha1', '4.4.beta3', '4.4.0'
+   * @param string $rev
+   *   a version number, e.g. '4.4.alpha1', '4.4.beta3', '4.4.0'.
    * @param null $currentVer
    *
    * @return void
@@ -61,8 +62,10 @@ class CRM_Upgrade_Incremental_php_FourFive {
   /**
    * Compute any messages which should be displayed after upgrade
    *
-   * @param $postUpgradeMessage string, alterable
-   * @param $rev string, an intermediate version; note that setPostUpgradeMessage is called repeatedly with different $revs
+   * @param string $postUpgradeMessage
+   *   alterable.
+   * @param string $rev
+   *   an intermediate version; note that setPostUpgradeMessage is called repeatedly with different $revs.
    * @return void
    */
   public function setPostUpgradeMessage(&$postUpgradeMessage, $rev) {
@@ -106,7 +109,8 @@ AND TABLE_SCHEMA = %1
     $dao = CRM_Core_DAO::executeQuery($query, $params, TRUE, NULL, FALSE, FALSE);
     if ($dao->fetch()) {
       if ($dao->CONSTRAINT_NAME == 'FK_civicrm_msg_template_pdf_format_id' ||
-        $dao->CONSTRAINT_NAME == 'pdf_format_id') {
+        $dao->CONSTRAINT_NAME == 'pdf_format_id'
+      ) {
         $sqlDropFK = "ALTER TABLE `civicrm_msg_template`
 DROP FOREIGN KEY `{$dao->CONSTRAINT_NAME}`,
 DROP KEY `{$dao->CONSTRAINT_NAME}`";
@@ -136,7 +140,10 @@ DROP KEY `{$dao->CONSTRAINT_NAME}`";
         FROM {$tableName}")->getDatabaseResult()->fetchRow();
       for ($startId = $minId; $startId <= $maxId; $startId += self::BATCH_SIZE) {
         $endId = $startId + self::BATCH_SIZE - 1;
-        $title = ts("Upgrade DB to 4.5.beta9: Fix line items for {$label} (%1 => %2)", array(1 => $startId, 2 => $endId));
+        $title = ts("Upgrade DB to 4.5.beta9: Fix line items for {$label} (%1 => %2)", array(
+            1 => $startId,
+            2 => $endId
+          ));
         $this->addTask($title, 'task_4_5_0_fixLineItem', $startId, $endId, $label);
       }
     }
@@ -150,8 +157,10 @@ DROP KEY `{$dao->CONSTRAINT_NAME}`";
    *
    *
    * @param CRM_Queue_TaskContext $ctx
-   * @param $startId int, the first/lowest entity ID to convert
-   * @param $endId int, the last/highest entity ID to convert
+   * @param int $startId
+   *   the first/lowest entity ID to convert.
+   * @param int $endId
+   *   the last/highest entity ID to convert.
    * @param
    *
    * @return bool
@@ -222,7 +231,8 @@ DROP KEY `{$dao->CONSTRAINT_NAME}`";
    *
    * @param CRM_Queue_TaskContext $ctx
    *
-   * @return bool TRUE for success
+   * @return bool
+   *   TRUE for success
    */
   public static function addNameFieldOptions(CRM_Queue_TaskContext $ctx) {
     $query = "SELECT `value` FROM `civicrm_setting` WHERE `group_name` = 'CiviCRM Preferences' AND `name` = 'contact_edit_options'";
@@ -245,12 +255,13 @@ DROP KEY `{$dao->CONSTRAINT_NAME}`";
    *
    * @param CRM_Queue_TaskContext $ctx
    *
-   * @return bool TRUE for success
+   * @return bool
+   *   TRUE for success
    */
   public static function migrateHonoreeInfo(CRM_Queue_TaskContext $ctx) {
     $query = "ALTER TABLE `civicrm_uf_join`
     ADD COLUMN `module_data` longtext COMMENT 'Json serialized array of data used by the ufjoin.module'";
-      CRM_Core_DAO::executeQuery($query);
+    CRM_Core_DAO::executeQuery($query);
 
     $honorTypes = array_keys(CRM_Core_OptionGroup::values('honor_type'));
     $ufGroupDAO = new CRM_Core_DAO_UFGroup();
@@ -268,8 +279,8 @@ DROP KEY `{$dao->CONSTRAINT_NAME}`";
         if ($domain->locales) {
           $locales = explode(CRM_Core_DAO::VALUE_SEPARATOR, $domain->locales);
           foreach ($locales as $locale) {
-            $honor_block_title =  "honor_block_title_{$locale}";
-            $honor_block_text =  "honor_block_text_{$locale}";
+            $honor_block_title = "honor_block_title_{$locale}";
+            $honor_block_text = "honor_block_text_{$locale}";
             $honorParams['soft_credit'] += array(
               $locale => array(
                 'honor_block_title' => $dao->$honor_block_title,