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'])) {
$versionData = $this->versionGuesser->guessVersion($package, $path);
if (is_array($versionData)) {
$package['version'] = $versionData['pretty_version'] ?: 'dev-master';
if (is_array($versionData) && $versionData['pretty_version']) {
$package['version'] = $versionData['pretty_version'];
} else {
$package['version'] = 'dev-master';
}