Skip to content

Commit 530f8ee

Browse files
committed
Writers refactoring fixes
1 parent 0b13b22 commit 530f8ee

File tree

7 files changed

+6
-15
lines changed

7 files changed

+6
-15
lines changed

src/PhpWord/Writer/HTML.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
namespace PhpOffice\PhpWord\Writer;
1919

20-
use PhpOffice\PhpWord\Element\AbstractElement;
2120
use PhpOffice\PhpWord\Exception\Exception;
2221
use PhpOffice\PhpWord\PhpWord;
2322
use PhpOffice\PhpWord\Style\Font;

src/PhpWord/Writer/HTML/Element/TextRun.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@
1717

1818
namespace PhpOffice\PhpWord\Writer\HTML\Element;
1919

20-
use PhpOffice\PhpWord\Element\Footnote as FootnoteElement;
21-
use PhpOffice\PhpWord\Element\TextRun as TextRunElement;
22-
use PhpOffice\PhpWord\Style\Paragraph;
23-
use PhpOffice\PhpWord\Writer\HTML\Style\Paragraph as ParagraphStyleWriter;
24-
2520
/**
2621
* TextRun element HTML writer
2722
*

src/PhpWord/Writer/HTML/Style/Generic.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ class Generic extends AbstractStyle
3131
*/
3232
public function write()
3333
{
34-
$this->style = $this->getStyle();
34+
$style = $this->getStyle();
3535
$css = array();
3636

37-
if (is_array($this->style) && !empty($this->style)) {
38-
$css = $this->style;
37+
if (is_array($style) && !empty($style)) {
38+
$css = $style;
3939
}
4040

4141
return $this->assembleCss($css);

src/PhpWord/Writer/HTML/Style/Image.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ class Image extends AbstractStyle
3131
*/
3232
public function write()
3333
{
34-
$this->style = $this->getStyle();
34+
$style = $this->getStyle();
3535
$css = array();
3636

37-
$css['width'] = $this->getValueIf($this->style->getWidth(), $this->style->getWidth() . 'px');
38-
$css['height'] = $this->getValueIf($this->style->getHeight(), $this->style->getHeight() . 'px');
37+
$css['width'] = $this->getValueIf($style->getWidth(), $style->getWidth() . 'px');
38+
$css['height'] = $this->getValueIf($style->getHeight(), $style->getHeight() . 'px');
3939

4040
return $this->assembleCss($css);
4141
}

src/PhpWord/Writer/RTF/Element/Text.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
use PhpOffice\PhpWord\Style;
2121
use PhpOffice\PhpWord\Style\Font as FontStyle;
22-
use PhpOffice\PhpWord\Style\Paragraph as ParagraphStyle;
2322
use PhpOffice\PhpWord\Writer\RTF\Style\Font as FontStyleWriter;
2423
use PhpOffice\PhpWord\Writer\RTF\Style\Paragraph as ParagraphStyleWriter;
2524

src/PhpWord/Writer/Word2007/Style/AbstractStyle.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
namespace PhpOffice\PhpWord\Writer\Word2007\Style;
1919

20-
use PhpOffice\PhpWord\Exception\Exception;
2120
use PhpOffice\PhpWord\Settings;
2221
use PhpOffice\PhpWord\Shared\XMLWriter;
2322

src/PhpWord/Writer/Word2007/Style/TextBox.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
namespace PhpOffice\PhpWord\Writer\Word2007\Style;
1919

20-
use PhpOffice\PhpWord\Shared\XMLWriter;
2120
use PhpOffice\PhpWord\Style\TextBox as TextBoxStyle;
2221

2322
/**

0 commit comments

Comments
 (0)