Skip to content

Commit

Permalink
Renamed Writer method
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Dec 13, 2024
1 parent 2df5562 commit d320522
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ All Notable changes to `Csv` will be documented in this file
- `XMLConverter::formatter`
- `HTMLConverter::formatter`
- `Writer::encloseNone`
- `Writer::encloseSelective`
- `Writer::encloseRequired`
- `Writer::noEnclosure`

### Deprecated
Expand Down
2 changes: 1 addition & 1 deletion docs/9.0/writer/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public Writer::forceEnclosure(): self
public Writer::relaxEnclosure(): self
public Writer::noEnclosure(): self
public Writer::encloseAll(): bool
public Writer::encloseSelective(): bool
public Writer::encloseRequired(): bool
public Writer::encloseNone(): bool
```

Expand Down
2 changes: 1 addition & 1 deletion src/Writer.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function encloseNone(): bool
* Tells whether new entries will be selectively enclosed on writing
* if the field content requires encoding.
*/
public function encloseSelective(): bool
public function encloseRequired(): bool
{
return self::ENCLOSE_SELECTIVE === $this->enclose_all;
}
Expand Down
6 changes: 3 additions & 3 deletions src/WriterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function testInsertNormalFile(): void

self::assertFalse($csv->encloseAll());
self::assertFalse($csv->encloseNone());
self::assertTrue($csv->encloseSelective());
self::assertTrue($csv->encloseRequired());
self::assertStringContainsString('jane,doe,[email protected]', $csv->toString());
}

Expand Down Expand Up @@ -310,7 +310,7 @@ public function testEncloseAll(): void

self::assertTrue($csv->encloseAll());
self::assertFalse($csv->encloseNone());
self::assertFalse($csv->encloseSelective());
self::assertFalse($csv->encloseRequired());
self::assertStringContainsString($expected, $csv->toString());
}

Expand Down Expand Up @@ -344,7 +344,7 @@ public function testEncloseNothing(): void

self::assertFalse($csv->encloseAll());
self::assertTrue($csv->encloseNone());
self::assertFalse($csv->encloseSelective());
self::assertFalse($csv->encloseRequired());
self::assertStringContainsString($expected, $csv->toString());
}
}

0 comments on commit d320522

Please sign in to comment.