Skip to content

Commit

Permalink
DevKit updates for 3.x branch (#667)
Browse files Browse the repository at this point in the history
Co-authored-by: Vincent Langlet <[email protected]>
  • Loading branch information
SonataCI and VincentLanglet authored Apr 3, 2024
1 parent 4a4e7d6 commit 1558265
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
'no_useless_return' => true,
'no_superfluous_elseif' => true,
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true, 'remove_inheritdoc' => true],
'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => true],
'nullable_type_declaration_for_default_null_value' => true,
'ordered_class_elements' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha', 'imports_order' => ['class', 'function', 'const']],
'phpdoc_order' => ['order' => ['var', 'param', 'throws', 'return', 'phpstan-var', 'psalm-var', 'phpstan-param', 'psalm-param', 'phpstan-return', 'psalm-return']],
Expand Down
6 changes: 3 additions & 3 deletions src/Writer/CsvWriterTerminate.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ final class CsvWriterTerminate extends \php_user_filter
/**
* @param resource $in
* @param resource $out
* @param int $rw_consumed
* @param int $consumed
* @param bool $closing
*/
public function filter($in, $out, &$rw_consumed, $closing): int
public function filter($in, $out, &$consumed, $closing): int
{
while ($bucket = stream_bucket_make_writeable($in)) {
if (isset($this->params['terminate'])) {
$bucket->data = preg_replace('/([^\r])\n/', '$1'.$this->params['terminate'], $bucket->data);
}
$rw_consumed += $bucket->datalen;
$consumed += (int) $bucket->datalen;
stream_bucket_append($out, $bucket);
}

Expand Down

0 comments on commit 1558265

Please sign in to comment.