diff --git a/src/ErrorHandler.php b/src/ErrorHandler.php index a34ec58935..0ba6cc32e1 100644 --- a/src/ErrorHandler.php +++ b/src/ErrorHandler.php @@ -458,9 +458,9 @@ private function handleException(\Throwable $exception): void * @param string $file The filename the backtrace was raised in * @param int $line The line number the backtrace was raised at * - * @return array - * * @psalm-param list $backtrace + * + * @return array */ private function cleanBacktraceFromErrorHandlerFrames(array $backtrace, string $file, int $line): array { diff --git a/src/Event.php b/src/Event.php index 1ac6cc6afb..5244f945c8 100644 --- a/src/Event.php +++ b/src/Event.php @@ -892,12 +892,12 @@ public function setSdkMetadata(string $name, $data): self /** * Gets the SDK metadata. * - * @return mixed - * * @psalm-template T of string|null * * @psalm-param T $name * + * @return mixed + * * @psalm-return (T is string ? mixed : array|null) */ public function getSdkMetadata(?string $name = null) diff --git a/src/FrameBuilder.php b/src/FrameBuilder.php index 7808ea9625..8c102ef283 100644 --- a/src/FrameBuilder.php +++ b/src/FrameBuilder.php @@ -158,9 +158,9 @@ private function isFrameInApp(string $file, ?string $functionName): bool * * @param array $backtraceFrame The frame data * - * @return array - * * @psalm-param StacktraceFrame $backtraceFrame + * + * @return array */ private function getFunctionArguments(array $backtraceFrame): array { diff --git a/src/Monolog/BreadcrumbHandler.php b/src/Monolog/BreadcrumbHandler.php index 8c5e03b0af..bb2b60ea06 100644 --- a/src/Monolog/BreadcrumbHandler.php +++ b/src/Monolog/BreadcrumbHandler.php @@ -26,13 +26,13 @@ final class BreadcrumbHandler extends AbstractProcessingHandler private $hub; /** - * @phpstan-param int|string|Level|LogLevel::* $level - * * @param HubInterface $hub The hub to which errors are reported * @param int|string $level The minimum logging level at which this * handler will be triggered * @param bool $bubble Whether the messages that are handled can * bubble up the stack or not + * + * @phpstan-param int|string|Level|LogLevel::* $level */ public function __construct(HubInterface $hub, $level = Logger::DEBUG, bool $bubble = true) { diff --git a/src/State/HubInterface.php b/src/State/HubInterface.php index 44d9e70e31..227a8451ed 100644 --- a/src/State/HubInterface.php +++ b/src/State/HubInterface.php @@ -51,12 +51,12 @@ public function popScope(): bool; * * @param callable $callback The callback to be executed * - * @return mixed|void The callback's return value, upon successful execution - * * @psalm-template T * * @psalm-param callable(Scope): T $callback * + * @return mixed|void The callback's return value, upon successful execution + * * @psalm-return T */ public function withScope(callable $callback); diff --git a/src/functions.php b/src/functions.php index 573ef7be82..286cab45c2 100644 --- a/src/functions.php +++ b/src/functions.php @@ -201,12 +201,12 @@ function configureScope(callable $callback): void * * @param callable $callback The callback to be executed * - * @return mixed|void The callback's return value, upon successful execution - * * @psalm-template T * * @psalm-param callable(Scope): T $callback * + * @return mixed|void The callback's return value, upon successful execution + * * @psalm-return T */ function withScope(callable $callback)