Skip to content

Commit

Permalink
Rewrite of the if statement.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Feb 27, 2020
1 parent 2862d4f commit fd4af8e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Node/MerkleNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,9 @@ public function hash(): string
*/
public function label(): string
{
if (true === $this->isLeaf()) {
return $this->getValue();
}

return $this->hash();
return true === $this->isLeaf() ?
$this->getValue() :
$this->hash();
}

/**
Expand Down

0 comments on commit fd4af8e

Please sign in to comment.