-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Eventjet\Ausdruck\Parser; | ||
|
||
enum Delimiters | ||
{ | ||
case Parentheses; | ||
case Brackets; | ||
case CurlyBraces; | ||
case AngleBrackets; | ||
|
||
public function start(): string | ||
{ | ||
return match ($this) { | ||
Check warning on line 16 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.2
Check warning on line 16 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.2
Check warning on line 16 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.2
Check warning on line 16 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.1 --prefer-lowest
Check warning on line 16 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.1 --prefer-lowest
Check warning on line 16 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.1 --prefer-lowest
Check warning on line 16 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.2 --prefer-lowest
Check warning on line 16 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.2 --prefer-lowest
Check warning on line 16 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.2 --prefer-lowest
Check warning on line 16 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.3 --prefer-lowest
Check warning on line 16 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.3 --prefer-lowest
Check warning on line 16 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.3 --prefer-lowest
Check warning on line 16 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.1
Check warning on line 16 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.1
Check warning on line 16 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.1
Check warning on line 16 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.3
Check warning on line 16 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.3
Check warning on line 16 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.3
|
||
self::Parentheses => '(', | ||
self::Brackets => '[', | ||
self::CurlyBraces => '{', | ||
self::AngleBrackets => '<', | ||
}; | ||
} | ||
|
||
public function end(): string | ||
{ | ||
return match ($this) { | ||
Check warning on line 26 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.2
Check warning on line 26 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.2
Check warning on line 26 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.2
Check warning on line 26 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.1 --prefer-lowest
Check warning on line 26 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.1 --prefer-lowest
Check warning on line 26 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.1 --prefer-lowest
Check warning on line 26 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.2 --prefer-lowest
Check warning on line 26 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.2 --prefer-lowest
Check warning on line 26 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.2 --prefer-lowest
Check warning on line 26 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.3 --prefer-lowest
Check warning on line 26 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.3 --prefer-lowest
Check warning on line 26 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.3 --prefer-lowest
Check warning on line 26 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.1
Check warning on line 26 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.1
Check warning on line 26 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.1
Check warning on line 26 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.3
Check warning on line 26 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.3
Check warning on line 26 in src/Parser/Delimiters.php GitHub Actions / Infection - 8.3
|
||
self::Parentheses => ')', | ||
self::Brackets => ']', | ||
self::CurlyBraces => '}', | ||
self::AngleBrackets => '>', | ||
}; | ||
} | ||
} |