Skip to content

Commit 321b95c

Browse files
Naorayclaude
andcommitted
refactor: use Arr::except instead of collection for session data filtering
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2017afc commit 321b95c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Tracing/SessionCollector.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Naoray\LaravelGithubMonolog\Tracing;
44

5+
use Illuminate\Support\Arr;
56
use Illuminate\Support\Facades\Context;
67
use Illuminate\Support\Facades\Session;
78
use Naoray\LaravelGithubMonolog\Tracing\Concerns\RedactsData;
@@ -27,9 +28,7 @@ public function collect(): void
2728
return;
2829
}
2930

30-
$data = collect(Session::all())
31-
->except(['_token', '_flash'])
32-
->toArray();
31+
$data = Arr::except(Session::all(), ['_token', '_flash']);
3332

3433
$session = [
3534
'data' => $this->redactPayload($data),

0 commit comments

Comments
 (0)