Skip to content

Commit

Permalink
Small codebase fixes and docblock clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Jan 20, 2025
1 parent 56b3598 commit f95ca7b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ All Notable changes to `Csv` will be documented in this file
- `Comparison::CONTAINS` must check the value is a string before calling `str_compare` [#548](https://github.com/thephpleague/csv/pull/548) by [cage-is](https://github.com/cage-is)
- Fix testing to improve Debian integration [#549](https://github.com/thephpleague/csv/pull/549) by [David Prévot and tenzap](https://github.com/tenzap)
- `Bom::tryFromSequence` and `Bom::fromSequence` supports the `Reader` and `Writer` classes.
- `XMLConverter::$formatter` visibility it should not be public.

### Removed

Expand Down
17 changes: 8 additions & 9 deletions src/TabularData.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,23 @@ interface TabularData extends IteratorAggregate
/**
* Returns the header associated with the tabular data.
*
* The header must contain unique string or to be an empty array
* if no header was specified.
* The header must contain unique string or be an empty array
* if no header is specified.
*
* @return array<string>
*/
public function getHeader(): array;

/**
* Returns the tabular data records as an iterator object containing flat array.
* Returns the tabular data rows as an iterator object containing flat array.
*
* Each record is represented as a simple array containing strings or null values.
* Each row is represented as a simple array containing values.
*
* If the CSV document has a header record then each record is combined
* to the header record and the header record is removed from the iterator.
* If the tabular data has a header included as a separate row then each record
* is combined to the header record and the header record is removed from the iteration.
*
* If the CSV document is inconsistent. Missing record fields are
* filled with null values while extra record fields are strip from
* the returned object.
* If the tabular data is inconsistent. Missing fields are filled with null values
* while extra record fields are strip from the returned array.
*
* @return Iterator<array-key, TValue>
*/
Expand Down
2 changes: 1 addition & 1 deletion src/XMLConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class XMLConverter
/** XML offset attribute name. */
protected string $offset_attr = '';
/** @var ?Closure(array, array-key): array */
public ?Closure $formatter = null;
protected ?Closure $formatter = null;

public static function create(): self
{
Expand Down

0 comments on commit f95ca7b

Please sign in to comment.