Skip to content

Commit

Permalink
Arrow functions
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Jun 18, 2022
1 parent 6db5f30 commit 7347cc7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/BigNumber.php
Expand Up @@ -81,9 +81,7 @@ public static function of($value) : BigNumber
$throw();
}

$getMatch = static function(string $value) use ($matches) : ?string {
return isset($matches[$value]) && $matches[$value] !== '' ? $matches[$value] : null;
};
$getMatch = static fn(string $value): ?string => (($matches[$value] ?? '') !== '') ? $matches[$value] : null;

$sign = $getMatch('sign');
$numerator = $getMatch('numerator');
Expand Down

0 comments on commit 7347cc7

Please sign in to comment.