From 804e574cdf50fcd224499a59d93b67e9ca682f33 Mon Sep 17 00:00:00 2001 From: Deeka Wong Date: Fri, 14 Apr 2023 14:17:35 +0800 Subject: [PATCH] Compatible with `Hyperf\Utils\Stringable` (#187) Co-authored-by: Deeka Wong <8337659+huangdijia@users.noreply.github.com> --- src/Command/TinkerCommand.php | 1 + src/TinkerCaster.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Command/TinkerCommand.php b/src/Command/TinkerCommand.php index b364373..6617e37 100644 --- a/src/Command/TinkerCommand.php +++ b/src/Command/TinkerCommand.php @@ -42,6 +42,7 @@ class TinkerCommand extends HyperfCommand 'Hyperf\Redis\Redis' => 'FriendsOfHyperf\Tinker\TinkerCaster::castRedis', 'Hyperf\Utils\Collection' => 'FriendsOfHyperf\Tinker\TinkerCaster::castCollection', 'Hyperf\Collection\Collection' => 'FriendsOfHyperf\Tinker\TinkerCaster::castCollection', + 'Hyperf\Utils\Stringable' => 'FriendsOfHyperf\Tinker\TinkerCaster::castStringable', 'Hyperf\Stringable\Stringable' => 'FriendsOfHyperf\Tinker\TinkerCaster::castStringable', 'Hyperf\ViewEngine\HtmlString' => 'FriendsOfHyperf\Tinker\TinkerCaster::castHtmlString', 'Symfony\Component\Console\Application' => 'FriendsOfHyperf\Tinker\TinkerCaster::castApplication', diff --git a/src/TinkerCaster.php b/src/TinkerCaster.php index 3b264ef..83a291e 100644 --- a/src/TinkerCaster.php +++ b/src/TinkerCaster.php @@ -92,7 +92,7 @@ public static function castHtmlString($htmlString): array /** * Get an array representing the properties of a fluent string. * - * @param \Hyperf\Stringable\Stringable $stringable + * @param \Hyperf\Stringable\Stringable|\Hyperf\Utils\Stringable $stringable */ public static function castStringable($stringable): array {