Skip to content

Commit b765312

Browse files
author
Roman Syroeshko
committed
https://github.com/PHPOffice/PHPWord/issues/46
FIXED: indentation.
1 parent a8b73b9 commit b765312

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

Classes/PHPWord/Template.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function __construct($strFilename)
6464
if ($this->_tempFileName !== false) {
6565
// Copy the source File to the temp File
6666
if (!copy($strFilename, $this->_tempFileName)) {
67-
throw new PHPWord_Exception('Could not copy the template from ' . $strFilename . ' to ' . $this->_tempFileName . '.');
67+
throw new PHPWord_Exception("Could not copy the template from {$strFilename} to {$this->_tempFileName}.");
6868
}
6969

7070
$this->_objZip = new ZipArchive();
@@ -85,25 +85,25 @@ public function __construct($strFilename)
8585
*/
8686
public function applyXslStyleSheet(&$xslDOMDocument, $xslOptions = array(), $xslOptionsURI = '')
8787
{
88-
$processor = new \XSLTProcessor();
88+
$processor = new \XSLTProcessor();
8989

90-
$processor->importStylesheet($xslDOMDocument);
90+
$processor->importStylesheet($xslDOMDocument);
9191

92-
if ($processor->setParameter($xslOptionsURI, $xslOptions) === false) {
93-
throw new \Exception('Could not set values for the given XSL style sheet parameters.');
94-
}
92+
if ($processor->setParameter($xslOptionsURI, $xslOptions) === false) {
93+
throw new \Exception('Could not set values for the given XSL style sheet parameters.');
94+
}
9595

96-
$xmlDOMDocument = new \DOMDocument();
97-
if ($xmlDOMDocument->loadXML($this->_documentXML) === false) {
98-
throw new \Exception('Could not load XML from the given template.');
99-
}
96+
$xmlDOMDocument = new \DOMDocument();
97+
if ($xmlDOMDocument->loadXML($this->_documentXML) === false) {
98+
throw new \Exception('Could not load XML from the given template.');
99+
}
100100

101-
$xmlTransformed = $processor->transformToXml($xmlDOMDocument);
102-
if ($xmlTransformed === false) {
103-
throw new \Exception('Could not transform the given XML document.');
104-
}
101+
$xmlTransformed = $processor->transformToXml($xmlDOMDocument);
102+
if ($xmlTransformed === false) {
103+
throw new \Exception('Could not transform the given XML document.');
104+
}
105105

106-
$this->_documentXML = $xmlTransformed;
106+
$this->_documentXML = $xmlTransformed;
107107
}
108108

109109
/**

0 commit comments

Comments
 (0)