This repository was archived by the owner on Jun 9, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1717use SRL \Interfaces \TestMethodProvider ;
1818
1919/**
20- * @method $this all() Apply the 'g' modifier
2120 * @method $this multiLine() Apply the 'm' modifier
2221 * @method $this singleLine() Apply the 's' modifier
2322 * @method $this caseInsensitive() Apply the 'i' modifier
3433 * @method $this noWhitespace() Match any non-whitespace character.
3534 * @method $this anyCharacter() Match any word character.
3635 * @method $this noCharacter() Match any non-word character.
36+ * @method $this backslash() Match a backslash (\).
3737 */
3838class Builder extends TestMethodProvider
3939{
@@ -57,7 +57,6 @@ class Builder extends TestMethodProvider
5757
5858 /** @var string[] Map method names to actual modifiers. */
5959 protected $ modifierMapper = [
60- 'all ' => 'g ' ,
6160 'multiLine ' => 'm ' ,
6261 'singleLine ' => 's ' ,
6362 'caseInsensitive ' => 'i ' ,
@@ -121,7 +120,12 @@ class Builder extends TestMethodProvider
121120 'add ' => '\W ' ,
122121 'type ' => self ::METHOD_TYPE_CHARACTER ,
123122 'allowed ' => self ::METHOD_TYPES_ALLOWED_FOR_CHARACTERS
124- ]
123+ ],
124+ 'backslash ' => [
125+ 'add ' => '\\' ,
126+ 'type ' => self ::METHOD_TYPE_CHARACTER ,
127+ 'allowed ' => self ::METHOD_TYPES_ALLOWED_FOR_CHARACTERS
128+ ],
125129 ];
126130
127131 /** @var string Desired group, if any. */
Original file line number Diff line number Diff line change 1717 * @method static \SRL\Builder digit(int $min = 0, int $max = 9)
1818 * @method static \SRL\Builder uppercaseLetter(string $min = 'A', string $max = 'Z')
1919 * @method static \SRL\Builder letter(string $min = 'a', string $max = 'z')
20- * @method static \SRL\Builder all() Apply the 'g' modifier
2120 * @method static \SRL\Builder multiLine() Apply the 'm' modifier
2221 * @method static \SRL\Builder singleLine() Apply the 's' modifier
2322 * @method static \SRL\Builder caseInsensitive() Apply the 'i' modifier
3332 * @method static \SRL\Builder noWhitespace() Match any non-whitespace character.
3433 * @method static \SRL\Builder anyCharacter() Match any word character.
3534 * @method static \SRL\Builder noCharacter() Match any non-word character.
35+ * @method static \SRL\Builder backslash() Match a backslash (\).
3636 *
3737 * @mixin \SRL\Language\Interpreter
3838 */
You can’t perform that action at this time.
0 commit comments