File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -78,8 +78,9 @@ public function write()
78
78
if (Settings::isOutputEscapingEnabled ()) {
79
79
// Scrutinizer notes that escapeHTML does not exist on AbstractEscaper.
80
80
// Nevertheless, it does exist for HTML writer.
81
+ $ escaper = $ this ->escaper ;
81
82
/** @scrutinizer ignore-call */
82
- $ contenx = $ this -> escaper ->escapeHtml ($ element ->getText ());
83
+ $ contenx = $ escaper ->escapeHtml ($ element ->getText ());
83
84
} else {
84
85
$ contenx = $ element ->getText ();
85
86
}
Original file line number Diff line number Diff line change @@ -84,15 +84,11 @@ public function write()
84
84
$ ind = $ style ->getIndentation ();
85
85
if (!is_null ($ ind )) {
86
86
$ left = $ ind ->getLeft ();
87
- if (is_int ($ left ) || is_float ($ left )) {
88
- $ inches = $ left * 1.0 / \PhpOffice \PhpWord \Shared \Converter::INCH_TO_TWIP ;
89
- $ css ['margin-left ' ] = ((string ) $ inches ) . 'in ' ;
90
- }
87
+ $ inches = $ left * 1.0 / \PhpOffice \PhpWord \Shared \Converter::INCH_TO_TWIP ;
88
+ $ css ['margin-left ' ] = ((string ) $ inches ) . 'in ' ;
91
89
$ left = $ ind ->getRight ();
92
- if (is_int ($ left ) || is_float ($ left )) {
93
- $ inches = $ left * 1.0 / \PhpOffice \PhpWord \Shared \Converter::INCH_TO_TWIP ;
94
- $ css ['margin-right ' ] = ((string ) $ inches ) . 'in ' ;
95
- }
90
+ $ inches = $ left * 1.0 / \PhpOffice \PhpWord \Shared \Converter::INCH_TO_TWIP ;
91
+ $ css ['margin-right ' ] = ((string ) $ inches ) . 'in ' ;
96
92
}
97
93
if ($ style ->hasPageBreakBefore ()) {
98
94
$ css ['page-break-before ' ] = 'always ' ;
You can’t perform that action at this time.
0 commit comments