Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2namespace Apie\RegexTools\Parts;
3
4use Stringable;
5
6interface RegexPartInterface extends Stringable
7{
8    /**
9     * Returns string length of regex part.
10     * @internal
11     */
12    public function getRegexStringLength(): int;
13
14    /**
15     * Returns minimal possible length of a string that matches this part.
16     */
17    public function getMinimalPossibleLength(): int;
18
19    /**
20     * Returns maximum possible length of a string that matches this part.
21     * Returning null means there a string can be of infinite length and still match the regular expression.
22     */
23    public function getMaximumPossibleLength(): ?int;
24
25    /**
26     * Changes part to make the regular expression case insensitive (similar to i regex modifier).
27     */
28    public function toCaseInsensitive(): RegexPartInterface;
29
30    /**
31     * Changes part to make . match \n as well (similar to s regex modifier).
32     */
33    public function toDotAll(): RegexPartInterface;
34
35    /**
36     * Changes part to remove start and end markers.
37     */
38    public function removeStartAndEndMarkers(): ?RegexPartInterface;
39}