Merge pull request #13979 from totten/master-phpcbf-2
[civicrm-core.git] / Civi / CiUtil / CsvPrinter.php
index 9cab44a90fc32883f803aa67180954d9cbbdef2a..4c4ec185a3efbd5d542725af792503a1549dbbbf 100644 (file)
@@ -1,17 +1,26 @@
 <?php
 namespace Civi\CiUtil;
 
+/**
+ * Class CsvPrinter
+ *
+ * @package Civi\CiUtil
+ */
 class CsvPrinter {
   var $file;
   var $headers;
   var $hasHeader = FALSE;
 
-  function __construct($file, $headers) {
+  /**
+   * @param $file
+   * @param $headers
+   */
+  public function __construct($file, $headers) {
     $this->file = fopen($file, "w");
     $this->headers = $headers;
   }
 
-  function printHeader() {
+  public function printHeader() {
     if ($this->hasHeader) {
       return;
     }
@@ -23,10 +32,15 @@ class CsvPrinter {
     $this->hasHeader = TRUE;
   }
 
-  function printRow($test, $values) {
+  /**
+   * @param $test
+   * @param $values
+   */
+  public function printRow($test, $values) {
     $this->printHeader();
     $row = $values;
     array_unshift($row, $test);
     fputcsv($this->file, $row);
   }
-}
\ No newline at end of file
+
+}