Author: mcantelon
Date: Thu Dec 29 11:17:38 2011
New Revision: 10463

Log:
Updated CSV import tool work to reflect Qubit coding standards.

Modified:
   trunk/lib/task/csvImportTask.class.php

Modified: trunk/lib/task/csvImportTask.class.php
==============================================================================
--- trunk/lib/task/csvImportTask.class.php      Thu Dec 29 00:03:05 2011        
(r10462)
+++ trunk/lib/task/csvImportTask.class.php      Thu Dec 29 11:17:38 2011        
(r10463)
@@ -171,9 +171,10 @@
   }
 }
 
-class csvImport {
-
-  public function __construct($options) {
+class csvImport
+{
+  public function __construct($options)
+  {
     $allowed_options = array(
       'columns',
       'default_status_id',
@@ -202,11 +203,13 @@
     );
   }
 
-  public function addColumnHandler($column, $handler) {
+  public function addColumnHandler($column, $handler)
+  {
     $this->handlers[$column] = $handler;
   }
 
-  protected function executeClosurePropertyIfSet($property) {
+  protected function executeClosurePropertyIfSet($property)
+  {
     // attempting to directly call an object property that's a
     // closure results in "Fatal error: Call to undefined method"
     if ($this->$property) {
@@ -214,7 +217,8 @@
     }
   }
 
-  public function ignored() {
+  public function ignored()
+  {
     $ignored = array();
     foreach($this->columns as $column) {
       if (
@@ -225,11 +229,12 @@
         array_push($ignored, $column);
       }
     }
+
     return $ignored;
   }
 
-  public function ignored_render() {
-
+  public function ignored_render()
+  {
     $output = '';
 
     $ignored = $this->ignored();
@@ -244,8 +249,8 @@
     return $output;
   }
 
-  public function csv($fh) {
-
+  public function csv($fh)
+  {
     // inform user of any columns not included in import
     print $this->ignored_render();
 
@@ -257,7 +262,8 @@
     }
   }
 
-  public function row($row) {
+  public function row($row = array())
+  {
     // execute row initialization logic
     $this->executeClosurePropertyIfSet('rowInit');
 
@@ -310,7 +316,8 @@
     }
   }
 
-  public function create_note($type_id, $text) {
+  public function create_note($type_id, $text)
+  {
     $note = new QubitNote;
     $note->objectId = $this->information_object->id;
     $note->typeId = $type_id;

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to