diff --git a/src/PhpWord/Shared/OLERead.php b/src/PhpWord/Shared/OLERead.php index 1321b8da..bcdda0c3 100644 --- a/src/PhpWord/Shared/OLERead.php +++ b/src/PhpWord/Shared/OLERead.php @@ -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; } /** diff --git a/src/PhpWord/Shared/PCLZip/pclzip.lib.php b/src/PhpWord/Shared/PCLZip/pclzip.lib.php index 5620c754..3fbc9327 100644 --- a/src/PhpWord/Shared/PCLZip/pclzip.lib.php +++ b/src/PhpWord/Shared/PCLZip/pclzip.lib.php @@ -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 . "]"); } // --------------------------------------------------------------------------------