Skip to content

Commit

Permalink
Improve internal code
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Jul 22, 2021
1 parent 380f884 commit 3af83d5
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 13 deletions.
4 changes: 1 addition & 3 deletions src/HTMLConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ class HTMLConverter
*/
protected $id_value = '';

/**
* @var XMLConverter
*/
/** @var XMLConverter */
protected $xml_converter;

public static function create(): self
Expand Down
2 changes: 1 addition & 1 deletion src/Reader.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Reader extends AbstractCsv implements TabularDataReader, JsonSerializable
/**
* header record.
*
* @var string[]
* @var array<string>
*/
protected $header = [];

Expand Down
2 changes: 1 addition & 1 deletion src/ResultSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ResultSet implements TabularDataReader, JsonSerializable
/**
* The CSV records collection header.
*
* @var array
* @var array<string>
*/
protected $header = [];

Expand Down
6 changes: 3 additions & 3 deletions src/Statement.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ class Statement
/**
* Callables to filter the iterator.
*
* @var callable[]
* @var array<callable>
*/
protected $where = [];

/**
* Callables to sort the iterator.
*
* @var callable[]
* @var array<callable>
*/
protected $order_by = [];

Expand Down Expand Up @@ -134,7 +134,7 @@ public function limit(int $limit): self
/**
* Execute the prepared Statement on the {@link Reader} object.
*
* @param string[] $header an optional header to use instead of the CSV document header
* @param array<string> $header an optional header to use instead of the CSV document header
*/
public function process(TabularDataReader $tabular_data, array $header = []): TabularDataReader
{
Expand Down
2 changes: 1 addition & 1 deletion src/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ private function filterControl(string $delimiter, string $enclosure, string $esc
*
* @see http://php.net/manual/en/SplFileObject.getcsvcontrol.php
*
* @return string[]
* @return array<string>
*/
public function getCsvControl(): array
{
Expand Down
4 changes: 2 additions & 2 deletions src/TabularDataReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function getIterator(): Iterator;
* The header must contains unique string or is an empty array
* if no header was specified.
*
* @return string[]
* @return array<string>
*/
public function getHeader(): array;

Expand All @@ -64,7 +64,7 @@ public function getHeader(): array;
* filled with null values while extra record fields are strip from
* the returned object.
*
* @param string[] $header an optional header to use instead of the CSV document header
* @param array<string> $header an optional header to use instead of the CSV document header
*/
public function getRecords(array $header = []): Iterator;

Expand Down
4 changes: 2 additions & 2 deletions src/Writer.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ class Writer extends AbstractCsv
/**
* callable collection to format the record before insertion.
*
* @var callable[]
* @var array<callable>
*/
protected $formatters = [];

/**
* callable collection to validate the record before insertion.
*
* @var callable[]
* @var array<callable>
*/
protected $validators = [];

Expand Down

0 comments on commit 3af83d5

Please sign in to comment.