Skip to content

Commit

Permalink
Lint all the things
Browse files Browse the repository at this point in the history
Signed-off-by: John Rayes <live627@gmail.com>
  • Loading branch information
live627 committed Dec 26, 2016
1 parent 60363da commit 4cf6bbc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .travis.yml
@@ -0,0 +1,9 @@
language: php

php:
- 5.3
- 5.6
- 7.0

script:
- if find . -name "*.php" ! -path "./vendor/*" -exec php -l {} 2>&1 \; | grep "syntax error, unexpected"; then exit 1; fi
7 changes: 5 additions & 2 deletions Sources/Subs.php
Expand Up @@ -5715,7 +5715,10 @@ function build_regex($strings, $delim = null)
$sub_regex = $index_to_regex($value, $delim);

if (count(array_keys($value)) == 1)
$new_key .= explode('(?'.'>', $sub_regex)[0];
{
$new_key_array = explode('(?'.'>', $sub_regex);
$new_key .= $new_key_array[0];
}
else
$sub_regex = '(?'.'>' . $sub_regex . ')';
}
Expand Down Expand Up @@ -5766,4 +5769,4 @@ function build_regex($strings, $delim = null)
return $regexes;
}

?>
?>

0 comments on commit 4cf6bbc

Please sign in to comment.