INFRA-132 - FunctionDeclarationArgumentSpacing.SpaceBeforeEquals
[civicrm-core.git] / tests / phpunit / WebTest / Import / ImportCiviSeleniumTestCase.php
index 85c6b67e617e4ca79fbfa0555bb0f67072ff5455..3f67491d36e4251b75a431e1038522e1c734e5f1 100644 (file)
@@ -35,28 +35,35 @@ class ImportCiviSeleniumTestCase extends CiviSeleniumTestCase {
   /**
    * Test csv import for each component.
    *
-   * @param string $component   component name ( Event, Contribution, Membership, Activity etc)
-   * @param array  $headers     csv data headers
-   * @param array  $rows        csv data rows
-   * @param string $contactType contact type
-   * @param string $mode        import mode
-   * @param array  $fieldMapper select mapper fields while import
-   * @param array  $other       other parameters
+   * @param string $component
+   *   Component name ( Event, Contribution, Membership, Activity etc).
+   * @param array $headers
+   *   Csv data headers.
+   * @param array $rows
+   *   Csv data rows.
+   * @param string $contactType
+   *   Contact type.
+   * @param string $mode
+   *   Import mode.
+   * @param array $fieldMapper
+   *   Select mapper fields while import.
+   * @param array $other
+   *   Other parameters.
    *                             useMappingName     : to reuse mapping
 
    *                             dateFormat         : date format of data
    *                             checkMapperHeaders : to override default check mapper headers
    *                             saveMapping        : save current mapping?
    *                             saveMappingName    : to override mapping name
-   *
    */
-  function importCSVComponent($component,
+  function importCSVComponent(
+    $component,
     $headers,
     $rows,
     $contactType = 'Individual',
-    $mode        = 'Skip',
+    $mode = 'Skip',
     $fieldMapper = array(),
-    $other       = array()
+    $other = array()
   ) {
 
     // Go to contact import page.
@@ -161,12 +168,18 @@ class ImportCiviSeleniumTestCase extends CiviSeleniumTestCase {
   /**
    * Test contact import.
    *
-   * @param array  $headers     csv data headers
-   * @param array  $rows        csv data rows
-   * @param string $contactType contact type
-   * @param string $mode        import mode
-   * @param array  $fieldMapper select mapper fields while import
-   * @param array  $other       other parameters
+   * @param array $headers
+   *   Csv data headers.
+   * @param array $rows
+   *   Csv data rows.
+   * @param string $contactType
+   *   Contact type.
+   * @param string $mode
+   *   Import mode.
+   * @param array $fieldMapper
+   *   Select mapper fields while import.
+   * @param array $other
+   *   Other parameters.
    *                             contactSubtype     : import for selected Contact Subtype
 
    *                             useMappingName     : to reuse mapping
@@ -182,8 +195,9 @@ class ImportCiviSeleniumTestCase extends CiviSeleniumTestCase {
    *                             selectTag          : select existing tag for contacts
    *                             callbackImportSummary : function to override default import summary assertions
    *
-   * @param string $type        import type (csv/sql)
-   *                             @todo:currently only supports csv, need to work on sql import
+   * @param string $type
+   *   Import type (csv/sql).
+   * @todo:currently only supports csv, need to work on sql import
    */
   public function importContacts($headers, $rows, $contactType = 'Individual', $mode = 'Skip', $fieldMapper = array(), $other = array(), $type = 'csv') {
 
@@ -350,7 +364,7 @@ class ImportCiviSeleniumTestCase extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Check confirmation alert.
-    $this->assertTrue((bool)preg_match("/^Are you sure you want to Import now[\s\S]$/", $this->getConfirmation()));
+    $this->assertTrue((bool) preg_match("/^Are you sure you want to Import now[\s\S]$/", $this->getConfirmation()));
     $this->chooseOkOnNextConfirmation();
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
@@ -417,9 +431,11 @@ class ImportCiviSeleniumTestCase extends CiviSeleniumTestCase {
 
   /**
    * Helper function to get the import url of the component.
-   * @param string $component component name
+   * @param string $component
+   *   Component name.
    *
-   * @return string import url
+   * @return string
+   *   import url
    */
   private function _getImportComponentUrl($component) {
     $importComponentUrl = array(
@@ -507,7 +523,8 @@ class ImportCiviSeleniumTestCase extends CiviSeleniumTestCase {
    * @param array $rows
    * @param string $contactType
    *
-   * @return array $contactIds  imported contact ids
+   * @return array
+   *   imported contact ids
    */
   public function _getImportedContactIds($rows, $contactType = 'Individual') {
     $contactIds = array();