Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianosferreira committed Jan 7, 2020
1 parent f012157 commit fb541e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/VersionParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ public function normalize($version, $fullVersion = null)
$fullVersion = $version;
}

if (preg_match('{^(\^[^,\s]++) ++as ++([^,\s\^]++)$}', $version, $match) ||
preg_match('{^([^,\s]++) ++as ++(\^[^,\s\^]++)$}', $version, $match) ||
preg_match('{^([^,\s]++) ++as ++(\~[^,\s\^]++)$}', $version, $match) ||
preg_match('{^(\~[^,\s]++) ++as ++([^,\s\^]++)$}', $version, $match)) {
if (preg_match('{^(\^[^,\s]++) ++as ++([^,\s]++)$}', $version, $match) ||
preg_match('{^([^,\s]++) ++as ++(\^[^,\s]++)$}', $version, $match) ||
preg_match('{^([^,\s]++) ++as ++(\~[^,\s]++)$}', $version, $match) ||
preg_match('{^(\~[^,\s]++) ++as ++([^,\s]++)$}', $version, $match)) {
throw new \UnexpectedValueException('the alias must be an exact version');
}

Expand Down

0 comments on commit fb541e8

Please sign in to comment.