diff --git a/monorepo/stubs/helpers.php b/monorepo/stubs/helpers.php index 552693a7b2c..03a83af3936 100644 --- a/monorepo/stubs/helpers.php +++ b/monorepo/stubs/helpers.php @@ -2,33 +2,35 @@ /** * @template T + * @param T $value + * @param (callable(T): mixed)|null $callback + * @return ($callback is null ? HigherOrderTapProxy : T) * - * @param T $value - * @param callable(?T): mixed $callback - * @return T + * @psalm-assert-if-true !null $callback + * @psalm-suppress ImplicitToStringCast */ function tap($value, $callback = null) { } +/** + * @template T + */ class HigherOrderTapProxy { /** - * @template T - * - * @param T $target + * @param T $target */ public function __construct($target) { } /** - * @template T - * - * @param T $target - * @param string $method - * @param array $parameters + * @param string $method + * @param array $parameters * @return T + * + * @psalm-suppress MixedInferredReturnType, MixedReturnStatement */ public function __call($method, $parameters) {