We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb9a74e commit fb6564aCopy full SHA for fb6564a
src/utils/Utils.php
@@ -121,7 +121,7 @@ final class Utils{
121
*/
122
public static function getNiceClosureName(\Closure $closure) : string{
123
$func = new \ReflectionFunction($closure);
124
- if(!str_ends_with($func->getName(), '{closure}')){
+ if(!str_contains($func->getName(), '{closure')){
125
//closure wraps a named function, can be done with reflection or fromCallable()
126
//isClosure() is useless here because it just tells us if $func is reflecting a Closure object
127
0 commit comments