More phpcbs code cleanups
authorEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 18 Jan 2022 00:32:13 +0000 (13:32 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 18 Jan 2022 01:11:55 +0000 (14:11 +1300)
install/langs.php
tests/phpunit/CRM/Campaign/BAO/CampaignTest.php
tests/phpunit/CRM/Case/XMLProcessor/ProcessTest.php
tests/phpunit/CRM/Case/XMLProcessor/ReportTest.php
tests/phpunit/CRM/Mailing/BAO/MailingTest.php
tests/phpunit/CRM/Upgrade/Incremental/php/FiveTwentyTest.php
tests/phpunit/CiviTest/ReleaseTestSettings.php.txt
tools/bin/scripts/set-version.php

index 46a387fbab6def90c55be10a8335f8ab1dd0dec5..0b98de24519f6b80c193003efdc30d2308a4e8c1 100644 (file)
@@ -48,4 +48,4 @@
   'tr_TR' => 'Turkish',
   'uk_UA' => 'Ukrainian',
   'vi_VN' => 'Vietnamese',
-);
\ No newline at end of file
+);
index 6166309a56c7f90064a8d8b79f80b5fd90a3fae3..b5627adff186e34c629edc490ff8149b7ffb2121 100644 (file)
@@ -15,7 +15,6 @@
  * @package CRM
  * @copyright CiviCRM LLC https://civicrm.org/licensing
  */
-
 class CRM_Campaign_BAO_CampaignTest extends CiviUnitTestCase {
 
   public function testCampaignSummary() {
@@ -39,4 +38,4 @@ class CRM_Campaign_BAO_CampaignTest extends CiviUnitTestCase {
     $this->assertEquals(1, CRM_Campaign_BAO_Campaign::getCampaignSummary(['status_id' => [2, 3]], TRUE));
   }
 
-} 
+}
index f16b697e439e2db219537de3492ea1f29848a566..c83fcfa9769ec9608a797ff499175f28b1d4f540 100644 (file)
@@ -407,8 +407,8 @@ class CRM_Case_XMLProcessor_ProcessTest extends CiviCaseTestCase {
    *   unique for each entry in the dataprovider since want to test a given
    *   relationship type against multiple xml strings. It's not a test
    *   identifier, it's an array key to use to look up something.
-   * @param $xmlString string
-   * @param $expected array
+   * @param string $xmlString
+   * @param array $expected
    * @param $dontcare array We're re-using the data provider for two tests and
    *   we don't care about those expected values.
    *
@@ -431,10 +431,10 @@ class CRM_Case_XMLProcessor_ProcessTest extends CiviCaseTestCase {
    *   unique for each entry in the dataprovider since want to test a given
    *   relationship type against multiple xml strings. It's not a test
    *   identifier, it's an array key to use to look up something.
-   * @param $xmlString string
+   * @param string $xmlString
    * @param $dontcare array We're re-using the data provider for two tests and
    *   we don't care about those expected values.
-   * @param $expected array
+   * @param array $expected
    *
    * @dataProvider xmlCaseRoleDataProvider
    */
index 987f0bd6a0dfcd95dafc924e7721cc836ab38cea..19437dcec36de123ae99801a1a777cd289308e14 100644 (file)
@@ -23,7 +23,7 @@ class CRM_Case_XMLProcessor_ReportTest extends CiviCaseTestCase {
    * Test that getCaseReport has the right output.
    *
    * @param $activitySetName string Also acts as data provider test identifier.
-   * @param $expected array
+   * @param array $expected
    *
    * @dataProvider caseReportDataProvider
    */
index fbfab8db9cca59530b2206c97f5c5b23e576b8a5..f1327ee35c99c9e1ff584d4d62a3f9b416c22e82 100644 (file)
@@ -29,7 +29,7 @@ class CRM_Mailing_BAO_MailingTest extends CiviUnitTestCase {
    * match the expected list
    *
    * @param $mailingID
-   * @param $expectedRecipients array
+   * @param array $expectedRecipients
    *   Array of contact ID that should be in the recipient list.
    */
   private function assertRecipientsCorrect($mailingID, $expectedRecipients) {
index 79ead6323dc9b6ba2c63eb124573e3a39ae604b2..c0f9e7a69b17e728c33bf888d0762e590f019a42 100644 (file)
@@ -919,8 +919,8 @@ ENDXMLDIFFNAMEEXPECTED;
   /**
    * Helper to add a case type to the database.
    *
-   * @param $name string
-   * @param $xml string
+   * @param string $name
+   * @param string $xml
    *
    * @return int
    */
index a977b49eb2d7c44a7e06bfbf8ad9b47f857e05f7..78fde75653f44ea1b416750bdf997a644a83a6ce 100644 (file)
@@ -2,34 +2,32 @@
 
 class ReleaseTestSettings {
 
-  var $publicSandbox  = false;
-  var $browser = '*firefox';
-  var $sandboxURL = 'http://url.url';
-  var $sandboxPATH = '';
-  var $installPATH = '/sites/trunk.drupal/modules/civicrm/install/';
-  var $upgradePATH = '/civicrm/upgrade?reset=1';
-  var $username = '';
-  var $password = '';
-  var $adminUsername = '';
-  var $adminPassword = '';
-        var $UFemail = 'noreply@civicrm.org';
+  public $publicSandbox  = FALSE;
+  public $browser = '*firefox';
+  public $sandboxURL = 'http://url.url';
+  public $sandboxPATH = '';
+  public $installPATH = '/sites/trunk.drupal/modules/civicrm/install/';
+  public $upgradePATH = '/civicrm/upgrade?reset=1';
+  public $username = '';
+  public $password = '';
+  public $adminUsername = '';
+  public $adminPassword = '';
+  public $UFemail = 'noreply@civicrm.org';
 
-        var $civiDBServer = 'localhost';
-        var $civiDBUser = '';
-        var $civiDBPass = '';
-        var $civiDBName = '';
+  public $civiDBServer = 'localhost';
+  public $civiDBUser = '';
+  public $civiDBPass = '';
+  public $civiDBName = '';
 
-        var $drupalDBServer = 'localhost';
-        var $drupalDBUser = '';
-        var $drupalDBPass = '';
-        var $drupalDBName = '';
+  public $drupalDBServer = 'localhost';
+  public $drupalDBUser = '';
+  public $drupalDBPass = '';
+  public $drupalDBName = '';
 
-
-  function __construct() {
+  public function __construct() {
     $this->fullSandboxPath = $this->sandboxURL . $this->sandboxPATH;
     $this->installURL = $this->fullSandboxPath . $this->installPATH;
     $this->upgradeURL = $this->fullSandboxPath . $this->upgradePATH;
   }
 
 }
-?>
index 153e2af57617aae11af9e60e3757602320407186..ceec68eaa53c347a77159ebd5bb2413f36e5495a 100755 (executable)
@@ -25,9 +25,12 @@ if (!isVersionValid($oldVersion)) {
   fatal("failed to read old version from \"xml/version.xml\"\n");
 }
 
-/** @var string $newVersion */
-/** @var bool $doCommit */
-/** @var bool $doSql */
+/**
+ * @var string $newVersion */
+/**
+ * @var bool $doCommit */
+/**
+ * @var bool $doSql */
 extract(parseArgs($argv));
 
 if (!isVersionValid($newVersion)) {
@@ -80,7 +83,7 @@ $infoXmls = findCoreInfoXml();
 foreach ($infoXmls as $infoXml) {
   updateXmlFile($infoXml, function (DOMDocument $dom) use ($newVersion) {
     foreach ($dom->getElementsByTagName('version') as $tag) {
-      /** @var \DOMNode $tag */
+      /* @var \DOMNode $tag */
       $tag->textContent = $newVersion;
     }
   });
@@ -188,10 +191,10 @@ function fatal($error) {
 }
 
 /**
-* @param array $argv
+ * @param array $argv
  *  Ex: ['myscript.php', '--no-commit', '5.6.7']
  * @return array
- *  Ex: ['scriptFile' => 'myscript.php', 'doCommit' => FALSE, 'newVersion' => '5.6.7']
+ *   Ex: ['scriptFile' => 'myscript.php', 'doCommit' => FALSE, 'newVersion' => '5.6.7']
  */
 function parseArgs($argv) {
   $parsed = [];