Skip to content

Commit

Permalink
Remove superfluous code that makes deserialization fail for no good r…
Browse files Browse the repository at this point in the history
…eason
  • Loading branch information
JeroenDeDauw committed Jul 20, 2014
1 parent fe91641 commit f993c18
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/Deserializers/ReferenceDeserializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ public function deserialize( $serialization ) {

$reference = $this->getDeserialized( $serialization );

$this->validateHash( $reference, $serialization );

return $reference;
}

Expand Down Expand Up @@ -95,14 +93,4 @@ private function assertSnaksOrderIsArray( array $serialization ) {
}
}

private function validateHash( Reference $reference, array $serialization ) {
if( !array_key_exists( 'hash', $serialization ) ) {
return;
}

if( $reference->getHash() !== $serialization['hash'] ) {
throw new DeserializationException( 'The reference serialization provides a wrong hash' );
}
}

}

0 comments on commit f993c18

Please sign in to comment.