Skip to content

Commit 961ba7e

Browse files
authored
Merge pull request #23 from petrknap/ascii
Added `Ascii::INFORMATION_SEPARATORS` group
2 parents 82750aa + 9abcb52 commit 961ba7e

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/Ascii.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@
77
/**
88
* @see https://datatracker.ietf.org/doc/html/rfc20
99
*
10-
* @todo upgrade to PHP 8.2 and move values to cases
10+
* @todo upgrade to PHP 8.2, move values to cases and move `values of cases` region under `groups of cases` region
1111
*/
1212
enum Ascii: string
1313
{
14+
#region values of cases
1415
public const FILE_SEPARATOR = "\x1C";
1516
public const GROUP_SEPARATOR = "\x1D";
1617
public const NULL = "\x00";
1718
public const RECORD_SEPARATOR = "\x1E";
1819
public const UNIT_SEPARATOR = "\x1F";
20+
#endregion
1921

2022
/**
2123
* Separates different files (databases)
@@ -35,6 +37,18 @@ enum Ascii: string
3537
*/
3638
case UnitSeparator = self::UNIT_SEPARATOR;
3739

40+
#region groups of cases
41+
/**
42+
* Used to separate and qualify information in a logical sense
43+
*/
44+
public const INFORMATION_SEPARATORS = [
45+
self::FileSeparator,
46+
self::GroupSeparator,
47+
self::RecordSeparator,
48+
self::UnitSeparator,
49+
];
50+
#endregion
51+
3852
/**
3953
* @see implode()
4054
*/

0 commit comments

Comments
 (0)