Skip to content

Commit

Permalink
Applied code review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwojs committed Apr 23, 2020
1 parent 21849b4 commit 380db64
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions eZ/Publish/Core/FieldType/Relation/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,13 @@ protected function getSortInfo(BaseValue $value)
*/
public function fromHash($hash)
{
if ($hash !== null) {
$destinationContentId = $hash['destinationContentId'];
if ($destinationContentId !== null) {
return new Value((int)$destinationContentId);
}
if ($hash === null) {
return $this->getEmptyValue();
}

$destinationContentId = $hash['destinationContentId'];
if ($destinationContentId !== null) {
return new Value((int)$destinationContentId);
}

return $this->getEmptyValue();
Expand Down

0 comments on commit 380db64

Please sign in to comment.