Skip to content

Commit 634275b

Browse files
committed
Update docblock and test suite for development
1 parent 9e0f843 commit 634275b

File tree

6 files changed

+8
-16
lines changed

6 files changed

+8
-16
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Changelog
22

33
All Notable changes to `Csv` will be documented in this file
4+
45
## Next - TBD
56

67
### Added

src/CharsetConverter.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ class CharsetConverter extends php_user_filter
4747
public $filtername;
4848

4949
/**
50-
* Contents of the params parameter passed to stream_filter_append
51-
* or stream_filter_prepend functions.
52-
*
53-
* @var mixed
50+
* @var mixed value passed to passed to stream_filter_append or stream_filter_prepend functions.
5451
*/
5552
public $params;
5653

@@ -194,8 +191,8 @@ public function __invoke(array $record): array
194191
/**
195192
* Walker method to convert the offset and the value of a CSV record field.
196193
*
197-
* @param mixed $value
198-
* @param mixed $offset
194+
* @param mixed $value can be a scalar type or null
195+
* @param mixed $offset can be a string or an int
199196
*/
200197
protected function encodeField(&$value, &$offset): void
201198
{

src/EncloseField.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ class EncloseField extends php_user_filter
4242
public $filtername;
4343

4444
/**
45-
* Contents of the params parameter passed to stream_filter_append
46-
* or stream_filter_prepend functions.
47-
*
48-
* @var mixed
45+
* @var mixed value passed to passed to stream_filter_append or stream_filter_prepend functions.
4946
*/
5047
public $params;
5148

src/RFC4180Field.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,7 @@ class RFC4180Field extends php_user_filter
5050
public $filtername;
5151

5252
/**
53-
* Contents of the params parameter passed to stream_filter_append
54-
* or stream_filter_prepend functions.
55-
*
56-
* @var mixed
53+
* @var mixed value passed to passed to stream_filter_append or stream_filter_prepend functions.
5754
*/
5855
public $params;
5956

src/Stream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class Stream implements SeekableIterator
7272
/**
7373
* Current iterator value.
7474
*
75-
* @var mixed
75+
* @var mixed can be a null false or a scalar type value
7676
*/
7777
protected $value;
7878

tests/WriterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function testInsertThrowsExceptionOnError(array $record): void
122122
self::expectExceptionMessage('Unable to write record to the CSV document');
123123
} else {
124124
self::expectException(Notice::class);
125-
self::expectExceptionMessageRegExp('/write of \d+ bytes failed with errno=9 Bad file descriptor/');
125+
self::expectExceptionMessageMatches('/write of \d+ bytes failed with errno=9 Bad file descriptor/');
126126
}
127127

128128
Writer::createFromPath(__DIR__.'/data/foo.csv', 'r')->insertOne($record);

0 commit comments

Comments
 (0)