mirror of
https://github.com/composer/composer
synced 2025-05-11 01:22:54 +00:00
Combine conditionals in one
This commit is contained in:
parent
550c01b471
commit
7d99a56332
1 changed files with 2 additions and 2 deletions
|
@ -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';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue