Simplify conditions and inline temp variables
parent
a64b652a6b
commit
2805a69e58
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue