Skip to content

Commit 623bd99

Browse files
committed
refactor: use extracted method in original method
1 parent 07e97c3 commit 623bd99

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/PhpWord/TemplateProcessor.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -265,17 +265,7 @@ public function getVariableCount()
265265
*/
266266
public function getVariables()
267267
{
268-
$variables = $this->getVariablesForPart($this->tempDocumentMainPart);
269-
270-
foreach ($this->tempDocumentHeaders as $headerXML) {
271-
$variables = array_merge($variables, $this->getVariablesForPart($headerXML));
272-
}
273-
274-
foreach ($this->tempDocumentFooters as $footerXML) {
275-
$variables = array_merge($variables, $this->getVariablesForPart($footerXML));
276-
}
277-
278-
return array_unique($variables);
268+
return array_keys($this->getVariableCount());
279269
}
280270

281271
/**

0 commit comments

Comments
 (0)