diff --git a/src/Composer/DependencyResolver/RuleWatchNode.php b/src/Composer/DependencyResolver/RuleWatchNode.php index eb3dd8667..3d31a38c5 100644 --- a/src/Composer/DependencyResolver/RuleWatchNode.php +++ b/src/Composer/DependencyResolver/RuleWatchNode.php @@ -90,9 +90,9 @@ class RuleWatchNode { if ($this->watch1 == $literal) { return $this->watch2; - } else { - return $this->watch1; } + + return $this->watch1; } /** diff --git a/src/Composer/Package/Archiver/HgExcludeFilter.php b/src/Composer/Package/Archiver/HgExcludeFilter.php index b9c81cdc1..3e2b25d5c 100644 --- a/src/Composer/Package/Archiver/HgExcludeFilter.php +++ b/src/Composer/Package/Archiver/HgExcludeFilter.php @@ -70,9 +70,9 @@ class HgExcludeFilter extends BaseExcludeFilter if ($this->patternMode == self::HG_IGNORE_GLOB) { return $this->patternFromGlob($line); - } else { - return $this->patternFromRegex($line); } + + return $this->patternFromRegex($line); } /** diff --git a/src/Composer/Util/Perforce.php b/src/Composer/Util/Perforce.php index 1ae63d70f..3058d870b 100644 --- a/src/Composer/Util/Perforce.php +++ b/src/Composer/Util/Perforce.php @@ -425,20 +425,20 @@ class Perforce $path = $identifier. '/' . $file; return $path; - } else { - $path = substr($identifier, 0, $index) . '/' . $file . substr($identifier, $index); - $command = $this->generateP4Command(' files ' . $path, false); - $this->executeCommand($command); - $result = $this->commandResult; - $index2 = strpos($result, 'no such file(s).'); - if ($index2 === false) { - $index3 = strpos($result, 'change'); - if ($index3 !== false) { - $phrase = trim(substr($result, $index3)); - $fields = explode(' ', $phrase); - - return substr($identifier, 0, $index) . '/' . $file . '@' . $fields[1]; - } + } + + $path = substr($identifier, 0, $index) . '/' . $file . substr($identifier, $index); + $command = $this->generateP4Command(' files ' . $path, false); + $this->executeCommand($command); + $result = $this->commandResult; + $index2 = strpos($result, 'no such file(s).'); + if ($index2 === false) { + $index3 = strpos($result, 'change'); + if ($index3 !== false) { + $phrase = trim(substr($result, $index3)); + $fields = explode(' ', $phrase); + + return substr($identifier, 0, $index) . '/' . $file . '@' . $fields[1]; } }