Skip to content

Commit

Permalink
fix regex to catch first validate close block
Browse files Browse the repository at this point in the history
  • Loading branch information
oxycoder committed May 19, 2018
1 parent cff8b81 commit 00cbf13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Oxycoder/ApiDoc/Generators/AbstractGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ protected function getVadilationInFunction($route, $bindings)
$source = file($filename);
$body = implode('', array_slice($source, $start_line, $length));

preg_match('/(validate\(\[)(.*)(\]\))/s', $body, $result);
preg_match('/(validate\(\[)(.*?)(\]\))/s', $body, $result);
if ($result) {
$stringArr = explode(',', $result[2]);
foreach ($stringArr as $line) {
Expand Down

0 comments on commit 00cbf13

Please sign in to comment.