Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
7 / 7 |
|
100.00% |
7 / 7 |
CRAP | |
100.00% |
1 / 1 |
| StartOfRegex | |
100.00% |
7 / 7 |
|
100.00% |
7 / 7 |
7 | |
100.00% |
1 / 1 |
| __toString | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getRegexStringLength | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getMinimalPossibleLength | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getMaximumPossibleLength | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| toCaseInsensitive | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| toDotAll | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| removeStartAndEndMarkers | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\RegexTools\Parts; |
| 3 | |
| 4 | final class StartOfRegex implements RegexPartInterface |
| 5 | { |
| 6 | public function __toString(): string |
| 7 | { |
| 8 | return '^'; |
| 9 | } |
| 10 | |
| 11 | public function getRegexStringLength(): int |
| 12 | { |
| 13 | return 1; |
| 14 | } |
| 15 | |
| 16 | public function getMinimalPossibleLength(): int |
| 17 | { |
| 18 | return 0; |
| 19 | } |
| 20 | |
| 21 | public function getMaximumPossibleLength(): int |
| 22 | { |
| 23 | return 0; |
| 24 | } |
| 25 | |
| 26 | public function toCaseInsensitive(): RegexPartInterface |
| 27 | { |
| 28 | return $this; |
| 29 | } |
| 30 | |
| 31 | public function toDotAll(): RegexPartInterface |
| 32 | { |
| 33 | return $this; |
| 34 | } |
| 35 | |
| 36 | public function removeStartAndEndMarkers(): ?RegexPartInterface |
| 37 | { |
| 38 | return null; |
| 39 | } |
| 40 | } |