Skip to content

Commit 259ce06

Browse files
committed
Callable can match change
1 parent a9d72c0 commit 259ce06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Coduo/PHPMatcher/Matcher/CallbackMatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ public function match($value, $pattern)
1717
*/
1818
public function canMatch($pattern)
1919
{
20-
return is_object($pattern) && $pattern instanceof \Closure;
20+
return is_callable($pattern);
2121
}
2222
}

0 commit comments

Comments
 (0)