Skip to content

Commit

Permalink
Improve the stub
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jul 17, 2024
1 parent 6963a43 commit ba198dc
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions monorepo/stubs/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,35 @@

/**
* @template T
* @param T $value
* @param (callable(T): mixed)|null $callback
* @return ($callback is null ? HigherOrderTapProxy<T> : 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)
{
Expand Down

0 comments on commit ba198dc

Please sign in to comment.