Skip to content

Commit 4250a77

Browse files
committed
Use Stringable whenever possible
1 parent 06223dd commit 4250a77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Generator/UrlGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ protected function doGenerate(array $variables, array $defaults, array $requirem
266266
if ($vars = get_object_vars($v)) {
267267
array_walk_recursive($vars, $caster);
268268
$v = $vars;
269-
} elseif (method_exists($v, '__toString')) {
269+
} elseif ($v instanceof \Stringable) {
270270
$v = (string) $v;
271271
}
272272
}

0 commit comments

Comments
 (0)