diff --git a/src/Functions.php b/src/Functions.php index 1b393bd..517abc1 100644 --- a/src/Functions.php +++ b/src/Functions.php @@ -10,6 +10,8 @@ * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ use Hyperf\Collection\Collection; +use Hyperf\Contract\Arrayable; +use Hyperf\Support\Optional; if (! function_exists('value')) { /** @@ -79,7 +81,7 @@ function with($value, ?callable $callback = null) * @template TKey of array-key * @template TValue * - * @param null|\Hyperf\Contract\Arrayable|iterable $value + * @param null|Arrayable|iterable $value * @return Collection */ function collect($value = null) @@ -289,7 +291,7 @@ function swoole_hook_flags(): int * * @param TValue $value * @param null|(callable(TValue):TReturn) $callback - * @return ($callback is null ? \Hyperf\Support\Optional : ($value is null ? null : TReturn)) + * @return ($callback is null ? Optional : ($value is null ? null : TReturn)) */ function optional($value = null, ?callable $callback = null) {