Skip to content

Commit d2b0b31

Browse files
committed
fix scrutinizer warnings
1 parent bc448ae commit d2b0b31

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PhpWord/TemplateProcessor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ protected function replaceClonedVariables($variableReplacements, $xmlBlock)
10881088
protected function replaceXmlBlock($macro, $block, $blockType = 'w:p')
10891089
{
10901090
$where = $this->findContainingXmlBlockForMacro($macro, $blockType);
1091-
if (false !== $where) {
1091+
if (is_array($where)) {
10921092
$this->tempDocumentMainPart = $this->getSlice(0, $where['start']) . $block . $this->getSlice($where['end']);
10931093
}
10941094

@@ -1132,7 +1132,7 @@ protected function findContainingXmlBlockForMacro($macro, $blockType = 'w:p')
11321132
* Note that only the first instance of the macro will be found
11331133
*
11341134
* @param string $search Macro name
1135-
* @param string $offset Offset from which to start searching
1135+
* @param int $offset Offset from which to start searching
11361136
* @return int -1 if macro not found
11371137
*/
11381138
protected function findMacro($search, $offset = 0)

0 commit comments

Comments
 (0)