From fc37515ec2566af577169c29a07432db87b4c5db Mon Sep 17 00:00:00 2001 From: vladar Date: Thu, 20 Oct 2016 19:15:20 +0700 Subject: [PATCH] Replaced instanceof check with is_array for shorthand notation of field definitions (as instanceof might be pretty slow) --- src/Type/Definition/FieldDefinition.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Type/Definition/FieldDefinition.php b/src/Type/Definition/FieldDefinition.php index 479f802..a6c59b9 100644 --- a/src/Type/Definition/FieldDefinition.php +++ b/src/Type/Definition/FieldDefinition.php @@ -95,7 +95,7 @@ class FieldDefinition { $map = []; foreach ($fields as $name => $field) { - if ($field instanceof Type) { + if (!is_array($field)) { $field = ['type' => $field]; } if (!isset($field['name'])) {