Skip to content

Commit 587fba9

Browse files
committed
fix validation rule with comma
1 parent b00d230 commit 587fba9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Oxycoder/ApiDoc/Generators/AbstractGenerator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ protected function getVadilationInFunction($route, $bindings)
255255

256256
preg_match('/(validate\(\[)(.*?)(\]\))/s', $body, $result);
257257
if ($result) {
258-
$stringArr = explode(',', $result[2]);
258+
$stringArr = preg_split("/'(\s|),+/s", $result[2], -1, PREG_SPLIT_NO_EMPTY);
259259
foreach ($stringArr as $line) {
260260
if (strpos($line, '=>') !== false) {
261261
$lineRule = explode('=>', $line);

0 commit comments

Comments
 (0)