From 9abcb5249d311cb710a307a02ababdc71162f293 Mon Sep 17 00:00:00 2001 From: Petr Knap <8299754+petrknap@users.noreply.github.com> Date: Sun, 13 Apr 2025 08:46:58 +0200 Subject: [PATCH] feat: added `Ascii::INFORMATION_SEPARATORS` group --- src/Ascii.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Ascii.php b/src/Ascii.php index 0d04ea2..4b90df0 100644 --- a/src/Ascii.php +++ b/src/Ascii.php @@ -7,15 +7,17 @@ /** * @see https://datatracker.ietf.org/doc/html/rfc20 * - * @todo upgrade to PHP 8.2 and move values to cases + * @todo upgrade to PHP 8.2, move values to cases and move `values of cases` region under `groups of cases` region */ enum Ascii: string { + #region values of cases public const FILE_SEPARATOR = "\x1C"; public const GROUP_SEPARATOR = "\x1D"; public const NULL = "\x00"; public const RECORD_SEPARATOR = "\x1E"; public const UNIT_SEPARATOR = "\x1F"; + #endregion /** * Separates different files (databases) @@ -35,6 +37,18 @@ enum Ascii: string */ case UnitSeparator = self::UNIT_SEPARATOR; + #region groups of cases + /** + * Used to separate and qualify information in a logical sense + */ + public const INFORMATION_SEPARATORS = [ + self::FileSeparator, + self::GroupSeparator, + self::RecordSeparator, + self::UnitSeparator, + ]; + #endregion + /** * @see implode() */