Skip to content

Commit b628d26

Browse files
committedMar 23, 2025
better method name
1 parent d43ca1b commit b628d26

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎src/Type/Regex/RegexGroupParser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function parseGroups(string $regex): ?RegexAstWalkResult
110110
RegexGroupWalkResult::createEmpty(),
111111
);
112112

113-
if (!$subjectAsGroupResult->containsEmptyStringLiteral()) {
113+
if (!$subjectAsGroupResult->mightContainEmptyStringLiteral()) {
114114
// we could handle numeric-string, in case we know the regex is delimited by ^ and $
115115
if ($subjectAsGroupResult->isNonFalsy()->yes()) {
116116
$astWalkResult = $astWalkResult->withSubjectBaseType(

‎src/Type/Regex/RegexGroupWalkResult.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function getOnlyLiterals(): ?array
103103
return $this->onlyLiterals;
104104
}
105105

106-
public function containsEmptyStringLiteral(): bool
106+
public function mightContainEmptyStringLiteral(): bool
107107
{
108108
if ($this->onlyLiterals === null) {
109109
return false;

0 commit comments

Comments
 (0)