1
0
Fork 0

Combine conditionals in one

pull/8296/head
Jordi Boggiano 2019-08-29 15:16:34 +02:00 committed by GitHub
parent 550c01b471
commit 7d99a56332
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -155,8 +155,8 @@ class PathRepository extends ArrayRepository implements ConfigurableRepositoryIn
if (!isset($package['version'])) { if (!isset($package['version'])) {
$versionData = $this->versionGuesser->guessVersion($package, $path); $versionData = $this->versionGuesser->guessVersion($package, $path);
if (is_array($versionData)) { if (is_array($versionData) && $versionData['pretty_version']) {
$package['version'] = $versionData['pretty_version'] ?: 'dev-master'; $package['version'] = $versionData['pretty_version'];
} else { } else {
$package['version'] = 'dev-master'; $package['version'] = 'dev-master';
} }