Skip to content

Commit

Permalink
Simplify condition.
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed May 29, 2018
1 parent 0412d4f commit 5662475
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/MYR.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,9 @@ public function __call(string $method, array $parameters)
$this->resolveMoneyObject($first), ...$parameters
);

if ($resolved instanceof Money) {
return $this->newInstance($resolved);
}

return $resolved;
return $resolved instanceof Money
? $this->newInstance($resolved)
: $resolved;
}

return $this->newInstance(
Expand Down

0 comments on commit 5662475

Please sign in to comment.