Correct type of closures

parent 746f205f
......@@ -137,7 +137,7 @@ abstract class Object {
public static function _toSet<T>(
ConstMapAccess<string, mixed> $data,
string $key,
(function(mixed, string, bool):T) $handler,
(function(ConstMapAccess<string, mixed>, string, bool):?T) $handler,
bool $required = true
): ?Set<T> {
if (!$data->containsKey($key)) {
......@@ -160,7 +160,7 @@ abstract class Object {
public static function _toVector<T>(
ConstMapAccess<string, mixed> $data,
string $key,
(function(mixed, string, bool):T) $handler,
(function(ConstMapAccess<string, mixed>, string, bool):?T) $handler,
bool $required = true
): ?Vector<T> {
if (!$data->containsKey($key)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment