Skip to content

Commit 0ca293b

Browse files
author
Xiang
committed
修改变量名称
1 parent 72cf409 commit 0ca293b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/PhpWord/Reader/Word2007/AbstractPart.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,10 @@ protected function readParagraph(XMLReader $xmlReader, DOMElement $domNode, $par
266266
} elseif ($xmlReader->elementExists('w:r/w:pict/v:shape/v:textbox', $domNode)) {
267267
//textbox
268268
$shapeStyle=null;
269-
$_style = $xmlReader->getAttribute('style', $domNode, 'w:r/w:pict/v:shape');
270-
if ($_style!=null){
269+
$styleVal = $xmlReader->getAttribute('style', $domNode, 'w:r/w:pict/v:shape');
270+
if ($styleVal!=null){
271271
$shapeStyle=[];
272-
foreach (explode(';', $_style) as $attribute){
272+
foreach (explode(';', $styleVal) as $attribute){
273273
if (!empty($attribute)){
274274
[$attributeKey,$attributeVal] = explode(':',$attribute);
275275
$attributeKey = str_replace('-', ' ', $attributeKey);
@@ -285,8 +285,8 @@ protected function readParagraph(XMLReader $xmlReader, DOMElement $domNode, $par
285285
}
286286
$textBox = $parent->addTextBox($shapeStyle);
287287
$nodes = $xmlReader->getElements('w:r/w:pict/v:shape/v:textbox/w:txbxContent/*', $domNode);
288-
foreach ($nodes as $_node){
289-
$this->readParagraph($xmlReader,$_node,$textBox,$docPart);
288+
foreach ($nodes as $node){
289+
$this->readParagraph($xmlReader,$node,$textBox,$docPart);
290290
}
291291
return;
292292
}
@@ -536,10 +536,10 @@ protected function readRunChild(XMLReader $xmlReader, DOMElement $node, Abstract
536536
$endnote->setRelationId($wId);
537537
} elseif ($node->nodeName == 'w:pict') {
538538
$shapeStyle=null;
539-
$_style = $xmlReader->getAttribute('style', $node, 'v:shape');
540-
if ($_style!=null){
539+
$styleVal = $xmlReader->getAttribute('style', $node, 'v:shape');
540+
if ($styleVal!=null){
541541
$shapeStyle=[];
542-
foreach (explode(';', $_style) as $attribute){
542+
foreach (explode(';', $styleVal) as $attribute){
543543
if (!empty($attribute)){
544544
[$attributeKey,$attributeVal] = explode(':',$attribute);
545545
$attributeKey = str_replace('-', ' ', $attributeKey);

0 commit comments

Comments
 (0)