Skip to content

Commit 52d689d

Browse files
committed
revert changes in AbstractCsv.php
1 parent 67207e0 commit 52d689d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

phpstan.tests.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ parameters:
77
path: tests/EscapeFormulaTest.php
88
- message: '#Parameter \#2 \$delimiters of function League\\Csv\\delimiter_detect expects array<string>, array<int, array\|string> given.#'
99
path: tests/DetectDelimiterTest.php
10-
- message: '#Parameter \#1 \$document of static method League\\Csv\\Polyfill\\EmptyEscapeParser::parse\(\) expects League\\Csv\\Stream\|SplFileObject, array given.#'
10+
- message: '#Parameter \#1 \$document of static method League\\Csv\\Polyfill\\EmptyEscapeParser::parse\(\) expects League\\Csv\\Stream\|SplFileObject, stdClass given.#'
1111
path: tests/Polyfill/EmptyEscapeParserTest.php
1212
reportUnmatchedIgnoredErrors: true
1313
checkMissingIterableValueType: false

src/AbstractCsv.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ abstract class AbstractCsv implements ByteSequence
9999
*
100100
* @param \SplFileObject|Stream $document The CSV Object instance
101101
*/
102-
private function __construct($document)
102+
protected function __construct($document)
103103
{
104104
$this->document = $document;
105105
[$this->delimiter, $this->enclosure, $this->escape] = $this->document->getCsvControl();

tests/Polyfill/EmptyEscapeParserTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class EmptyEscapeParserTest extends TestCase
3232
public function testConstructorThrowsTypeErrorWithUnknownDocument(): void
3333
{
3434
self::expectException(TypeError::class);
35-
$records = EmptyEscapeParser::parse([]);
35+
$records = EmptyEscapeParser::parse(new \stdClass());
3636
$records->rewind();
3737
}
3838

0 commit comments

Comments
 (0)