From 623bd993d8bebeae4d4d4da21b19b7f7ffbfe8e2 Mon Sep 17 00:00:00 2001 From: Nicolas Dermine Date: Mon, 5 Feb 2018 17:49:23 +0100 Subject: [PATCH] refactor: use extracted method in original method --- src/PhpWord/TemplateProcessor.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php index f5df06b1..2cc56728 100644 --- a/src/PhpWord/TemplateProcessor.php +++ b/src/PhpWord/TemplateProcessor.php @@ -265,17 +265,7 @@ class TemplateProcessor */ public function getVariables() { - $variables = $this->getVariablesForPart($this->tempDocumentMainPart); - - foreach ($this->tempDocumentHeaders as $headerXML) { - $variables = array_merge($variables, $this->getVariablesForPart($headerXML)); - } - - foreach ($this->tempDocumentFooters as $footerXML) { - $variables = array_merge($variables, $this->getVariablesForPart($footerXML)); - } - - return array_unique($variables); + return array_keys($this->getVariableCount()); } /**