@@ -121,7 +121,7 @@ public function captureException(
121
121
$ event = new Event ('CakeSentry.Client.beforeCapture ' , $ this , compact ('exception ' , 'request ' ));
122
122
$ eventManager ->dispatch ($ event );
123
123
124
- if ($ extras ) {
124
+ if ($ extras !== null ) {
125
125
$ this ->hub ->configureScope (function (Scope $ scope ) use ($ extras ): void {
126
126
$ scope ->setExtras ($ extras );
127
127
});
@@ -152,7 +152,7 @@ public function captureError(
152
152
$ event = new Event ('CakeSentry.Client.beforeCapture ' , $ this , compact ('error ' , 'request ' ));
153
153
$ eventManager ->dispatch ($ event );
154
154
155
- if ($ extras ) {
155
+ if ($ extras !== null ) {
156
156
$ this ->hub ->configureScope (function (Scope $ scope ) use ($ extras ): void {
157
157
$ scope ->setExtras ($ extras );
158
158
});
@@ -163,7 +163,7 @@ public function captureError(
163
163
164
164
$ client = $ this ->hub ->getClient ();
165
165
if ($ client ) {
166
- /** @var array<int, array{function?: string, line?: int, file?: string, class?: class-string, type?: string, args?: array}> $trace */
166
+ /** @var list< array{function?: string, line?: int, file?: string, class?: class-string, type?: string, args?: array}> $trace */
167
167
$ trace = $ this ->cleanedTrace ($ error ->getTrace ());
168
168
/** @psalm-suppress ArgumentTypeCoercion */
169
169
$ stacktrace = $ client ->getStacktraceBuilder ()
@@ -196,7 +196,7 @@ public function getHub(): HubInterface
196
196
* @param array<array<string, null|int|string|array>> $traces
197
197
* @return array<array<string, null|int|string|array>>
198
198
*/
199
- private function cleanedTrace (array $ traces ): array
199
+ protected function cleanedTrace (array $ traces ): array
200
200
{
201
201
foreach ($ traces as $ key => $ trace ) {
202
202
if (isset ($ trace ['line ' ]) && ($ trace ['line ' ] === '?? ' || $ trace ['line ' ] === '' )) {
0 commit comments