Skip to content

Commit

Permalink
adding PHP8.4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Mar 24, 2024
1 parent 82e4f1e commit db307cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Base32.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ private function __construct(string $alphabet, string $padding)
1 !== strlen($padding) => throw new ValueError('The padding character must a single character.'),
"\r" === $padding => throw new ValueError('The padding character can not be the carriage return character.'),
"\n" === $padding => throw new ValueError('The padding character can not be the newline escape sequence.'),
' ' === $padding => throw new ValueError('The padding character can not be the empty string sequence.'),
' ' === $padding => throw new ValueError('The padding character can not be the space character.'),
self::ALPHABET_SIZE !== strlen($alphabet) => throw new ValueError('The alphabet must be a 32 bytes long string.'),
self::ALPHABET_SIZE !== strlen(count_chars($normalizeAlphabet, 3)) => throw new ValueError('The alphabet must contain omly unique characters.'), /* @phpstan-ignore-line */
str_contains($alphabet, "\r") => throw new ValueError('The alphabet can not contain the carriage return character.'),
str_contains($alphabet, "\n") => throw new ValueError('The alphabet can not contain the newline escape sequence.'),
str_contains($alphabet, " ") => throw new ValueError('The alphabet can not contain the space character.'),
str_contains($normalizeAlphabet, strtoupper($padding)) => throw new ValueError('The alphabet can not contain the padding character.'),
self::ALPHABET_SIZE !== strlen(count_chars($normalizeAlphabet, 3)) => throw new ValueError('The alphabet must contain unique characters.'), /* @phpstan-ignore-line */
default => [$alphabet, $padding],
};
}
Expand Down

0 comments on commit db307cd

Please sign in to comment.