Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Constraint/JsonValueMatchesSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ public function __construct($schema)
}

/**
* VERY dirty hack to force a JSON document into an instance of the stdClass class.
* VERY dirty hack to force a JSON document into an object.
*
* Yell if you can think of something better.
*
* @param array|stdClass $jsonDocument
* @return stdClass
*/
private function forceToObject($jsonDocument): stdClass
private function forceToObject($jsonDocument)
{
if (is_string($jsonDocument)) {
return json_decode($jsonDocument);
Expand Down