/**
* 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.
/**
* 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
* 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') {
$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());
/**
* 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(
* @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();