Skip to content

Commit 951c0c8

Browse files
committed
Leverage First-class callable syntax
1 parent 1b4304d commit 951c0c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

LazyString.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public static function fromCallable(callable|array $callback, mixed ...$argument
5050
public static function fromStringable(string|int|float|bool|\Stringable $value): static
5151
{
5252
if (\is_object($value)) {
53-
return static::fromCallable([$value, '__toString']);
53+
return static::fromCallable($value->__toString(...));
5454
}
5555

5656
$lazyString = new static();

0 commit comments

Comments
 (0)