Version 1
[yaffs-website] / vendor / consolidation / output-formatters / tests / src / PropertyListWithCsvCells.php
diff --git a/vendor/consolidation/output-formatters/tests/src/PropertyListWithCsvCells.php b/vendor/consolidation/output-formatters/tests/src/PropertyListWithCsvCells.php
new file mode 100644 (file)
index 0000000..09e9ead
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+namespace Consolidation\TestUtils;
+
+use Consolidation\OutputFormatters\Options\FormatterOptions;
+use Consolidation\OutputFormatters\StructuredData\PropertyList;
+use Consolidation\OutputFormatters\StructuredData\RenderCellInterface;
+
+class PropertyListWithCsvCells extends PropertyList implements RenderCellInterface
+{
+    public function renderCell($key, $cellData, FormatterOptions $options, $rowData)
+    {
+        if (is_array($cellData)) {
+            return implode(',', $cellData);
+        }
+        return $cellData;
+    }
+}