@@ -72,7 +72,7 @@ print_r($iterator->toArray());
7272$iterator = $dataset->getIterator();
7373while ($iterator->hasNext()) {
7474 $row = $iterator->moveNext();
75-
75+
7676 print_r($row->get("field1"));
7777}
7878```
@@ -97,7 +97,7 @@ $output = RowOutput::getInstance()
9797 ->addFormat("field1", "Test {field1}")
9898 ->addFormat("field2", "Showing {} and {field3}");
9999 ->addCustomFormat("field3", function ($row, $field, $value) {
100- // return the formatted output.
100+ // return the formatted output.
101101 // $row: The row object with all values
102102 // $field: The field has been processed
103103 // $value: The field value
@@ -126,10 +126,10 @@ $validator = RowValidator::getInstance()
126126 ->regexValidation("field4", '/\d{4}-\d{2}-\d{2}/')
127127 ->customValidation("field3", function($value) {
128128 // Return any string containing the error message if validation FAILS
129- // otherwise, just return null and the valition will pass.
129+ // otherwise, just return null and the valition will pass.
130130 });
131131
132- $validator->validate($row) // Will return an array with the error messages. Empty array if not errors.
132+ $validator->validate($row) // Will return an array with the error messages. Empty array if not errors.
133133```
134134
135135## Formatters
@@ -139,7 +139,7 @@ AnyDataset comes with an extensible set to format the AnyDataset. The interface
139139``` php
140140namespace ByJG\AnyDataset\Core\Formatter;
141141
142- interface FormatterInterface
142+ interface FormatterInterface
143143{
144144 /**
145145 * Return the object in your original format, normally as object
@@ -177,12 +177,14 @@ Example:
177177$formatter = new XmlFormatter($anydataset->getIterator());
178178$formatter->raw(); // Return a DOM object
179179$formatter->toText(); // Return the XML as a text
180- $formatter->saveToFile("/path/to/file.xml"); // Save the XML Text to a file.
180+ $formatter->saveToFile("/path/to/file.xml"); // Save the XML Text to a file.
181181```
182182
183183## Install
184184
185- Just type: ` composer require "byjg/anydataset=4.1.*" `
185+ ``` bash
186+ composer require " byjg/anydataset=5.0.*"
187+ ```
186188
187189## Running Unit tests
188190
0 commit comments