From 0857a7ec8f73bdad0440c94954e93a661ed434ab Mon Sep 17 00:00:00 2001 From: zumba Date: Mon, 8 Dec 2025 13:11:14 +0200 Subject: [PATCH 1/2] Set the escape character explicitly to the empty string --- src/TokenMapper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TokenMapper.php b/src/TokenMapper.php index ab61f4d..d2d4903 100644 --- a/src/TokenMapper.php +++ b/src/TokenMapper.php @@ -54,7 +54,7 @@ private function write(string $requestId, string $debugToken): void throw new RuntimeException(sprintf('File [%s] not found', $this->path())); } - fputcsv($file, [$requestId, $debugToken]); + fputcsv($file, [$requestId, $debugToken], escape: ""); fclose($file); } @@ -73,7 +73,7 @@ private function load(): array throw new RuntimeException(sprintf('File [%s] not found', $this->path())); } - while ($row = fgetcsv($file)) { + while ($row = fgetcsv($file, escape: "")) { /** @var array{0: string, 1: string} $row */ $map[$row[0]] = $row[1]; } From 85f060d19c52ccc4bd3b76abec77a256156f6f07 Mon Sep 17 00:00:00 2001 From: zumba Date: Mon, 8 Dec 2025 14:50:03 +0200 Subject: [PATCH 2/2] Change quotes to match coding style --- src/TokenMapper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TokenMapper.php b/src/TokenMapper.php index d2d4903..9c5e2fc 100644 --- a/src/TokenMapper.php +++ b/src/TokenMapper.php @@ -54,7 +54,7 @@ private function write(string $requestId, string $debugToken): void throw new RuntimeException(sprintf('File [%s] not found', $this->path())); } - fputcsv($file, [$requestId, $debugToken], escape: ""); + fputcsv($file, [$requestId, $debugToken], escape: ''); fclose($file); } @@ -73,7 +73,7 @@ private function load(): array throw new RuntimeException(sprintf('File [%s] not found', $this->path())); } - while ($row = fgetcsv($file, escape: "")) { + while ($row = fgetcsv($file, escape: '')) { /** @var array{0: string, 1: string} $row */ $map[$row[0]] = $row[1]; }