From 7859fe72e88adc5221281a6b2cb1e3b57ee616ef Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 8 Sep 2020 11:15:24 +0200 Subject: [PATCH] Fix line wrapping --- src/Composer/Package/Version/VersionGuesser.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Composer/Package/Version/VersionGuesser.php b/src/Composer/Package/Version/VersionGuesser.php index 610f17333..6e71e7d5e 100644 --- a/src/Composer/Package/Version/VersionGuesser.php +++ b/src/Composer/Package/Version/VersionGuesser.php @@ -127,8 +127,11 @@ class VersionGuesser // find current branch and collect all branch names foreach ($this->process->splitLines($output) as $branch) { if ($branch && preg_match('{^(?:\* ) *(\(no branch\)|\(detached from \S+\)|\(HEAD detached at \S+\)|\S+) *([a-f0-9]+) .*$}', $branch, $match)) { - if ($match[1] === '(no branch)' || strpos($match[1], '(detached ') === 0 || strpos($match[1], - '(HEAD detached at') === 0) { + if ( + $match[1] === '(no branch)' + || strpos($match[1], '(detached ') === 0 + || strpos($match[1], '(HEAD detached at') === 0 + ) { $version = 'dev-' . $match[2]; $prettyVersion = $version; $isFeatureBranch = true;