INFRA-132 - Spaces around "."
[civicrm-core.git] / CRM / Custom / Import / Parser.php
index e3fbee9c533ad3061e6d07dc4a5e9523bb41ccf9..8b209c8a6cbdc0e873db8d88beb2558a791ee137 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -39,33 +39,45 @@ abstract class CRM_Custom_Import_Parser extends CRM_Contact_Import_Parser {
   protected $_fileName;
 
   /**#@+
-   * @access protected
    * @var integer
    */
 
   /**
-   * imported file size
+   * Imported file size
    */
   protected $_fileSize;
 
   /**
-   * separator being used
+   * Separator being used
    */
   protected $_separator;
 
   /**
-   * total number of lines in file
+   * Total number of lines in file
    */
   protected $_lineCount;
 
   /**
-   * whether the file has a column header or not
+   * Whether the file has a column header or not
    *
    * @var boolean
    */
   protected $_haveColumnHeader;
 
-  function run($fileName,
+  /**
+   * @param string $fileName
+   * @param string $separator
+   * @param int $mapper
+   * @param bool $skipColumnHeader
+   * @param int|string $mode
+   * @param int|string $contactType
+   * @param int $onDuplicate
+   *
+   * @return mixed
+   * @throws Exception
+   */
+  function run(
+    $fileName,
     $separator = ',',
     &$mapper,
     $skipColumnHeader = FALSE,
@@ -232,7 +244,6 @@ abstract class CRM_Custom_Import_Parser extends CRM_Contact_Import_Parser {
 
     fclose($fd);
 
-
     if ($mode == self::MODE_PREVIEW || $mode == self::MODE_IMPORT) {
       $customHeaders = $mapper;
 
@@ -282,9 +293,8 @@ abstract class CRM_Custom_Import_Parser extends CRM_Contact_Import_Parser {
    * @param array mapped array of values
    *
    * @return void
-   * @access public
    */
-  function setActiveFields($fieldKeys) {
+  public function setActiveFields($fieldKeys) {
     $this->_activeFieldCount = count($fieldKeys);
     foreach ($fieldKeys as $key) {
       if (empty($this->_fields[$key])) {
@@ -297,12 +307,11 @@ abstract class CRM_Custom_Import_Parser extends CRM_Contact_Import_Parser {
   }
 
   /**
-   * function to format the field values for input to the api
+   * Format the field values for input to the api
    *
    * @return array (reference ) associative array of name/value pairs
-   * @access public
    */
-  function &getActiveFieldParams() {
+  public function &getActiveFieldParams() {
     $params = array();
     for ($i = 0; $i < $this->_activeFieldCount; $i++) {
       if (isset($this->_activeFields[$i]->_value)
@@ -320,10 +329,11 @@ abstract class CRM_Custom_Import_Parser extends CRM_Contact_Import_Parser {
    *
    * @param CRM_Core_Session $store
    *
+   * @param int $mode
+   *
    * @return void
-   * @access public
    */
-  function set($store, $mode = self::MODE_SUMMARY) {
+  public function set($store, $mode = self::MODE_SUMMARY) {
     $store->set('fileSize', $this->_fileSize);
     $store->set('lineCount', $this->_lineCount);
     $store->set('seperator', $this->_separator);
@@ -370,4 +380,3 @@ abstract class CRM_Custom_Import_Parser extends CRM_Contact_Import_Parser {
     }
   }
 }
-