Simplify conditions and inline temp variables
parent
a64b652a6b
commit
2805a69e58
|
@ -485,8 +485,7 @@ class Perforce
|
||||||
$resArray = explode(PHP_EOL, $result);
|
$resArray = explode(PHP_EOL, $result);
|
||||||
$tags = array();
|
$tags = array();
|
||||||
foreach ($resArray as $line) {
|
foreach ($resArray as $line) {
|
||||||
$index = strpos($line, 'Label');
|
if (strpos($line, 'Label') !== false) {
|
||||||
if (!($index === false)) {
|
|
||||||
$fields = explode(' ', $line);
|
$fields = explode(' ', $line);
|
||||||
$tags[$fields[1]] = $this->getStream() . '@' . $fields[1];
|
$tags[$fields[1]] = $this->getStream() . '@' . $fields[1];
|
||||||
}
|
}
|
||||||
|
@ -502,8 +501,7 @@ class Perforce
|
||||||
$result = $this->commandResult;
|
$result = $this->commandResult;
|
||||||
$resArray = explode(PHP_EOL, $result);
|
$resArray = explode(PHP_EOL, $result);
|
||||||
foreach ($resArray as $line) {
|
foreach ($resArray as $line) {
|
||||||
$index = strpos($line, 'Depot');
|
if (strpos($line, 'Depot') !== false) {
|
||||||
if (!($index === false)) {
|
|
||||||
$fields = explode(' ', $line);
|
$fields = explode(' ', $line);
|
||||||
if (strcmp($this->p4Depot, $fields[1]) === 0) {
|
if (strcmp($this->p4Depot, $fields[1]) === 0) {
|
||||||
$this->p4DepotType = $fields[3];
|
$this->p4DepotType = $fields[3];
|
||||||
|
|
Loading…
Reference in New Issue