Clean elses

This commit is contained in:
Gabriel Caruso 2017-12-14 12:21:16 -02:00
parent 194e5c47e4
commit 87acd3764b
2 changed files with 30 additions and 30 deletions

View File

@ -115,7 +115,7 @@ class OLERead
$bbdBlocks = (self::BIG_BLOCK_SIZE - self::BIG_BLOCK_DEPOT_BLOCKS_POS)/4;
}
// @codeCoverageIgnoreEnd
for ($i = 0; $i < $bbdBlocks; ++$i) {
$bigBlockDepotBlocks[$i] = self::getInt4d($this->data, $pos);
$pos += 4;
@ -192,27 +192,27 @@ class OLERead
$block = self::getInt4d($this->smallBlockChain, $block*4);
}
return $streamData;
} else {
$numBlocks = $this->props[$stream]['size'] / self::BIG_BLOCK_SIZE;
if ($this->props[$stream]['size'] % self::BIG_BLOCK_SIZE != 0) {
++$numBlocks;
}
if ($numBlocks == 0) {
return '';// @codeCoverageIgnore
}
$block = $this->props[$stream]['startBlock'];
while ($block != -2) {
$pos = ($block + 1) * self::BIG_BLOCK_SIZE;
$streamData .= substr($this->data, $pos, self::BIG_BLOCK_SIZE);
$block = self::getInt4d($this->bigBlockChain, $block*4);
}
return $streamData;
}
$numBlocks = $this->props[$stream]['size'] / self::BIG_BLOCK_SIZE;
if ($this->props[$stream]['size'] % self::BIG_BLOCK_SIZE != 0) {
++$numBlocks;
}
if ($numBlocks == 0) {
return '';// @codeCoverageIgnore
}
$block = $this->props[$stream]['startBlock'];
while ($block != -2) {
$pos = ($block + 1) * self::BIG_BLOCK_SIZE;
$streamData .= substr($this->data, $pos, self::BIG_BLOCK_SIZE);
$block = self::getInt4d($this->bigBlockChain, $block*4);
}
return $streamData;
}
/**

View File

@ -1244,9 +1244,9 @@ class PclZip
{
if (PCLZIP_ERROR_EXTERNAL == 1) {
return (PclErrorCode());
} else {
return ($this->error_code);
}
return ($this->error_code);
}
// --------------------------------------------------------------------------------
@ -1289,9 +1289,9 @@ class PclZip
if ($p_with_code) {
return ($v_value . ' (' . $this->error_code . ')');
} else {
return ($v_value);
}
return ($v_value);
}
// --------------------------------------------------------------------------------
@ -1304,13 +1304,13 @@ class PclZip
{
if (PCLZIP_ERROR_EXTERNAL == 1) {
return (PclErrorString());
} else {
if ($p_full) {
return ($this->errorName(true) . " : " . $this->error_string);
} else {
return ($this->error_string . " [code " . $this->error_code . "]");
}
}
if ($p_full) {
return ($this->errorName(true) . " : " . $this->error_string);
}
return ($this->error_string . " [code " . $this->error_code . "]");
}
// --------------------------------------------------------------------------------