Skip to content

Commit

Permalink
Fix function_declaration syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
vinkla committed Nov 7, 2023
1 parent a2d51e0 commit c9ea137
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Sqids.php
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ public function __construct(
if (strlen((string) $word) >= 3) {
$wordLowercased = strtolower($word);
$wordChars = str_split((string) $wordLowercased);
$intersection = array_filter($wordChars, fn ($c) => in_array($c, $alphabetChars));
$intersection = array_filter($wordChars, fn($c) => in_array($c, $alphabetChars));
if (count($intersection) == count($wordChars)) {
$filteredBlocklist[] = strtolower((string) $wordLowercased);
}
Expand Down Expand Up @@ -655,7 +655,7 @@ public function encode(array $numbers): string
return '';
}

$inRangeNumbers = array_filter($numbers, fn ($n) => $n >= 0 && $n <= self::maxValue());
$inRangeNumbers = array_filter($numbers, fn($n) => $n >= 0 && $n <= self::maxValue());
if (count($inRangeNumbers) != count($numbers)) {
throw new InvalidArgumentException(
'Encoding supports numbers between 0 and ' . self::maxValue()
Expand Down

0 comments on commit c9ea137

Please sign in to comment.