projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #13979 from totten/master-phpcbf-2
[civicrm-core.git]
/
Civi
/
CiUtil
/
CsvPrinter.php
diff --git
a/Civi/CiUtil/CsvPrinter.php
b/Civi/CiUtil/CsvPrinter.php
index 9cab44a90fc32883f803aa67180954d9cbbdef2a..4c4ec185a3efbd5d542725af792503a1549dbbbf 100644
(file)
--- a/
Civi/CiUtil/CsvPrinter.php
+++ b/
Civi/CiUtil/CsvPrinter.php
@@
-1,17
+1,26
@@
<?php
namespace Civi\CiUtil;
<?php
namespace Civi\CiUtil;
+/**
+ * Class CsvPrinter
+ *
+ * @package Civi\CiUtil
+ */
class CsvPrinter {
var $file;
var $headers;
var $hasHeader = FALSE;
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;
}
$this->file = fopen($file, "w");
$this->headers = $headers;
}
- function printHeader() {
+
public
function printHeader() {
if ($this->hasHeader) {
return;
}
if ($this->hasHeader) {
return;
}
@@
-23,10
+32,15
@@
class CsvPrinter {
$this->hasHeader = TRUE;
}
$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);
}
$this->printHeader();
$row = $values;
array_unshift($row, $test);
fputcsv($this->file, $row);
}
-}
\ No newline at end of file
+
+}