1
0
Fork 0

Simplify conditions and inline temp variables

pull/7641/head^2
Gabriel Caruso 2018-10-14 17:48:29 -03:00 committed by Rob
parent a64b652a6b
commit 2805a69e58
1 changed files with 2 additions and 4 deletions

View File

@ -485,8 +485,7 @@ class Perforce
$resArray = explode(PHP_EOL, $result);
$tags = array();
foreach ($resArray as $line) {
$index = strpos($line, 'Label');
if (!($index === false)) {
if (strpos($line, 'Label') !== false) {
$fields = explode(' ', $line);
$tags[$fields[1]] = $this->getStream() . '@' . $fields[1];
}
@ -502,8 +501,7 @@ class Perforce
$result = $this->commandResult;
$resArray = explode(PHP_EOL, $result);
foreach ($resArray as $line) {
$index = strpos($line, 'Depot');
if (!($index === false)) {
if (strpos($line, 'Depot') !== false) {
$fields = explode(' ', $line);
if (strcmp($this->p4Depot, $fields[1]) === 0) {
$this->p4DepotType = $fields[3];