Skip to content

Commit

Permalink
fix builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jordisala1991 authored and github-actions[bot] committed Jun 2, 2023
1 parent 8db1daf commit ac18c5d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Writer/CsvWriter.php
Expand Up @@ -94,9 +94,9 @@ public function write(array $data): void
++$this->position;
}

if (1 !== \strlen($this->delimiter) ||
1 !== \strlen($this->enclosure) ||
1 !== \strlen($this->escape)) {
if (1 !== \strlen($this->delimiter)
|| 1 !== \strlen($this->enclosure)
|| 1 !== \strlen($this->escape)) {
throw new InvalidDataFormatException(<<<'EXCEPTION'
Context: trying to write CSV data
Problem: delimiter, enclosure or escape character is actually a
Expand Down
5 changes: 5 additions & 0 deletions src/Writer/SitemapWriter.php
Expand Up @@ -42,6 +42,8 @@ final class SitemapWriter implements WriterInterface
* @param string $groupName Name of sub-sitemap (optional)
* @param string[] $headers Indicate the need for namespace in the header sitemap
* @param bool $autoIndex If you want to generate index of sitemap (optional)
*
* @phpstan-param non-empty-string $folder
*/
public function __construct(
private string $folder,
Expand Down Expand Up @@ -111,6 +113,9 @@ public function close(): void
* @param string $filename A sitemap file name, optional
*
* @throws \RuntimeException
*
* @phpstan-param non-empty-string $folder
* @phpstan-param non-empty-string $pattern
*/
public static function generateSitemapIndex(string $folder, string $baseUrl, string $pattern = 'sitemap*.xml', string $filename = 'sitemap.xml'): void
{
Expand Down
3 changes: 3 additions & 0 deletions tests/Writer/SitemapWriterTest.php
Expand Up @@ -18,6 +18,9 @@

final class SitemapWriterTest extends TestCase
{
/**
* @phpstan-var non-empty-string
*/
private string $folder;

protected function setUp(): void
Expand Down

0 comments on commit ac18c5d

Please sign in to comment.