Skip to content

Commit 3c2c957

Browse files
committed
1 parent e4cfe0b commit 3c2c957

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

OptionsResolver.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,28 +1216,28 @@ private function verifyTypes(string $type, mixed $value, ?array &$invalidTypes =
12161216
private function splitOutsideParenthesis(string $type): array
12171217
{
12181218
return preg_split(<<<'EOF'
1219-
/
1220-
# Define a recursive subroutine for matching balanced parentheses
1221-
(?(DEFINE)
1222-
(?<balanced>
1223-
\( # Match an opening parenthesis
1224-
(?: # Start a non-capturing group for the contents
1225-
[^()] # Match any character that is not a parenthesis
1226-
| # OR
1227-
(?&balanced) # Recursively match a nested balanced group
1228-
)* # Repeat the group for all contents
1229-
\) # Match the final closing parenthesis
1219+
/
1220+
# Define a recursive subroutine for matching balanced parentheses
1221+
(?(DEFINE)
1222+
(?<balanced>
1223+
\( # Match an opening parenthesis
1224+
(?: # Start a non-capturing group for the contents
1225+
[^()] # Match any character that is not a parenthesis
1226+
| # OR
1227+
(?&balanced) # Recursively match a nested balanced group
1228+
)* # Repeat the group for all contents
1229+
\) # Match the final closing parenthesis
1230+
)
12301231
)
1231-
)
12321232
1233-
# Match any balanced parenthetical group, then skip it
1234-
(?&balanced)(*SKIP)(*FAIL) # Use the defined subroutine and discard the match
1233+
# Match any balanced parenthetical group, then skip it
1234+
(?&balanced)(*SKIP)(*FAIL) # Use the defined subroutine and discard the match
12351235
1236-
| # OR
1236+
| # OR
12371237
1238-
\| # Match the pipe delimiter (only if not inside a skipped group)
1239-
/x
1240-
EOF, $type);
1238+
\| # Match the pipe delimiter (only if not inside a skipped group)
1239+
/x
1240+
EOF, $type);
12411241
}
12421242

12431243
/**

0 commit comments

Comments
 (0)