diff --git a/src/JsonSchema/Constraints/TypeConstraint.php b/src/JsonSchema/Constraints/TypeConstraint.php index e9f4a230..f67b2fdb 100644 --- a/src/JsonSchema/Constraints/TypeConstraint.php +++ b/src/JsonSchema/Constraints/TypeConstraint.php @@ -69,8 +69,8 @@ public function check(&$value = null, $schema = null, JsonPointer $path = null, $wording[] = self::$wording[$type]; } $this->addError(ConstraintError::TYPE(), $path, array( - 'expected' => gettype($value), - 'found' => $this->implodeWith($wording, ', ', 'or') + 'expected' => $this->implodeWith($wording, ', ', 'or'), + 'found' => gettype($value) )); } }