From d166e94adf6d9a0efbd6354a0498c1051c44069b Mon Sep 17 00:00:00 2001 From: acelot Date: Wed, 12 Sep 2018 20:30:33 +0700 Subject: [PATCH] Fixed up extra keys validation --- src/Struct.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Struct.php b/src/Struct.php index b3c846e..3ab9463 100644 --- a/src/Struct.php +++ b/src/Struct.php @@ -190,7 +190,7 @@ protected function validate(array $newData): void $extraKeys = array_keys(array_diff_key($newData, $props)); if (!empty($extraKeys)) { throw new ValidationException(array_map(function ($extraKey) { - return [$extraKey => "Property \"${$extraKey}\" not defined in schema"]; + return [$extraKey => "Property \"$extraKey\" not defined in schema"]; }, $extraKeys)); }