@@ -222,7 +222,7 @@ public function cloneRow($search, $numberOfClones)
222
222
* @param string $blockname
223
223
* @param integer $clones
224
224
* @param boolean $replace
225
- * @return null
225
+ * @return string| null
226
226
*/
227
227
public function cloneBlock ($ blockname , $ clones = 1 , $ replace = true )
228
228
{
@@ -263,7 +263,6 @@ public function replaceBlock($blockname, $replacement)
263
263
* Delete a block of text
264
264
*
265
265
* @param string $blockname
266
- * @param string $replacement
267
266
*/
268
267
public function deleteBlock ($ blockname )
269
268
{
@@ -317,7 +316,7 @@ public function saveAs($strFilename)
317
316
*
318
317
* @param string $documentPartXML
319
318
* @param string $search
320
- * @param mixed $replace
319
+ * @param string $replace
321
320
* @param integer $limit
322
321
* @return string
323
322
*/
@@ -335,16 +334,10 @@ protected function setValueForPart($documentPartXML, $search, $replace, $limit)
335
334
$ search = '${ ' . $ search . '} ' ;
336
335
}
337
336
338
- if (!is_array ($ replace )) {
339
- if (!String::isUTF8 ($ replace )) {
340
- $ replace = utf8_encode ($ replace );
341
- }
342
- $ replace = htmlspecialchars ($ replace );
343
- } else {
344
- foreach ($ replace as $ key => $ value ) {
345
- $ replace [$ key ] = htmlspecialchars ($ value );
346
- }
337
+ if (!String::isUTF8 ($ replace )) {
338
+ $ replace = utf8_encode ($ replace );
347
339
}
340
+ $ replace = htmlspecialchars ($ replace );
348
341
349
342
$ regExpDelim = '/ ' ;
350
343
$ escapedSearch = preg_quote ($ search , $ regExpDelim );
0 commit comments