1
0
Fork 0

Merge pull request #8718 from localheinz/fix/early

Fix: Return early
pull/8740/head
Jordi Boggiano 2020-03-29 16:59:26 +02:00 committed by GitHub
commit a8c105da34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 20 deletions

View File

@ -63,7 +63,10 @@ class VersionGuesser
*/
public function guessVersion(array $packageConfig, $path)
{
if (function_exists('proc_open')) {
if (!function_exists('proc_open')) {
return null;
}
$versionData = $this->guessGitVersion($packageConfig, $path);
if (null !== $versionData && null !== $versionData['version']) {
return $this->postprocess($versionData);
@ -83,7 +86,8 @@ class VersionGuesser
if (null !== $versionData && null !== $versionData['version']) {
return $this->postprocess($versionData);
}
}
return null;
}
private function postprocess(array $versionData)