1
0
Fork 0

Clean elses

pull/6903/head
Gabriel Caruso 2017-12-14 05:17:53 -02:00
parent ed20b3b4f6
commit 32a409a3ee
3 changed files with 17 additions and 17 deletions

View File

@ -90,9 +90,9 @@ class RuleWatchNode
{ {
if ($this->watch1 == $literal) { if ($this->watch1 == $literal) {
return $this->watch2; return $this->watch2;
} else {
return $this->watch1;
} }
return $this->watch1;
} }
/** /**

View File

@ -70,9 +70,9 @@ class HgExcludeFilter extends BaseExcludeFilter
if ($this->patternMode == self::HG_IGNORE_GLOB) { if ($this->patternMode == self::HG_IGNORE_GLOB) {
return $this->patternFromGlob($line); return $this->patternFromGlob($line);
} else {
return $this->patternFromRegex($line);
} }
return $this->patternFromRegex($line);
} }
/** /**

View File

@ -425,20 +425,20 @@ class Perforce
$path = $identifier. '/' . $file; $path = $identifier. '/' . $file;
return $path; 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];
} }
} }