@@ -121,7 +121,7 @@ public function captureException(
121121 $ event = new Event ('CakeSentry.Client.beforeCapture ' , $ this , compact ('exception ' , 'request ' ));
122122 $ eventManager ->dispatch ($ event );
123123
124- if ($ extras ) {
124+ if ($ extras !== null ) {
125125 $ this ->hub ->configureScope (function (Scope $ scope ) use ($ extras ): void {
126126 $ scope ->setExtras ($ extras );
127127 });
@@ -152,7 +152,7 @@ public function captureError(
152152 $ event = new Event ('CakeSentry.Client.beforeCapture ' , $ this , compact ('error ' , 'request ' ));
153153 $ eventManager ->dispatch ($ event );
154154
155- if ($ extras ) {
155+ if ($ extras !== null ) {
156156 $ this ->hub ->configureScope (function (Scope $ scope ) use ($ extras ): void {
157157 $ scope ->setExtras ($ extras );
158158 });
@@ -163,7 +163,7 @@ public function captureError(
163163
164164 $ client = $ this ->hub ->getClient ();
165165 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 */
167167 $ trace = $ this ->cleanedTrace ($ error ->getTrace ());
168168 /** @psalm-suppress ArgumentTypeCoercion */
169169 $ stacktrace = $ client ->getStacktraceBuilder ()
@@ -196,7 +196,7 @@ public function getHub(): HubInterface
196196 * @param array<array<string, null|int|string|array>> $traces
197197 * @return array<array<string, null|int|string|array>>
198198 */
199- private function cleanedTrace (array $ traces ): array
199+ protected function cleanedTrace (array $ traces ): array
200200 {
201201 foreach ($ traces as $ key => $ trace ) {
202202 if (isset ($ trace ['line ' ]) && ($ trace ['line ' ] === '?? ' || $ trace ['line ' ] === '' )) {
0 commit comments