Commit 690c36cd authored by Simon Welsh's avatar Simon Welsh

Correct type of closures

parent 746f205f
...@@ -137,7 +137,7 @@ abstract class Object { ...@@ -137,7 +137,7 @@ abstract class Object {
public static function _toSet<T>( public static function _toSet<T>(
ConstMapAccess<string, mixed> $data, ConstMapAccess<string, mixed> $data,
string $key, string $key,
(function(mixed, string, bool):T) $handler, (function(ConstMapAccess<string, mixed>, string, bool):?T) $handler,
bool $required = true bool $required = true
): ?Set<T> { ): ?Set<T> {
if (!$data->containsKey($key)) { if (!$data->containsKey($key)) {
...@@ -160,7 +160,7 @@ abstract class Object { ...@@ -160,7 +160,7 @@ abstract class Object {
public static function _toVector<T>( public static function _toVector<T>(
ConstMapAccess<string, mixed> $data, ConstMapAccess<string, mixed> $data,
string $key, string $key,
(function(mixed, string, bool):T) $handler, (function(ConstMapAccess<string, mixed>, string, bool):?T) $handler,
bool $required = true bool $required = true
): ?Vector<T> { ): ?Vector<T> {
if (!$data->containsKey($key)) { 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