Skip to content

Commit 8ce1a19

Browse files
authored
make FontStyle basedOn paragraph if the paragraph is set on the font (#926)
* make FontStyle based on paragraph if it set * replace tab with spaces * basedOn not correctly set if FontStyle is based on other FontStyle * Fix warnings
1 parent 2fc685b commit 8ce1a19

35 files changed

+153
-89
lines changed

src/PhpWord/ComplexType/FootnoteProperties.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ final class FootnoteProperties
6565

6666
/**
6767
* Get the Footnote Positioning Location
68-
*
68+
*
6969
* @return string
7070
*/
7171
public function getPos()
@@ -75,7 +75,7 @@ public function getPos()
7575

7676
/**
7777
* Set the Footnote Positioning Location (pageBottom, beneathText, sectEnd, docEnd)
78-
*
78+
*
7979
* @param string $pos
8080
* @throws \InvalidArgumentException
8181
* @return self
@@ -99,7 +99,7 @@ public function setPos($pos)
9999

100100
/**
101101
* Get the Footnote Numbering Format
102-
*
102+
*
103103
* @return string
104104
*/
105105
public function getNumFmt()
@@ -109,7 +109,7 @@ public function getNumFmt()
109109

110110
/**
111111
* Set the Footnote Numbering Format
112-
*
112+
*
113113
* @param string $numFmt One of NumberFormat
114114
* @return self
115115
*/
@@ -122,7 +122,7 @@ public function setNumFmt($numFmt)
122122

123123
/**
124124
* Get the Footnote Numbering Format
125-
*
125+
*
126126
* @return double
127127
*/
128128
public function getNumStart()
@@ -132,7 +132,7 @@ public function getNumStart()
132132

133133
/**
134134
* Set the Footnote Numbering Format
135-
*
135+
*
136136
* @param double $numStart
137137
* @return self
138138
*/
@@ -144,7 +144,7 @@ public function setNumStart($numStart)
144144

145145
/**
146146
* Get the Footnote and Endnote Numbering Starting Value
147-
*
147+
*
148148
* @return string
149149
*/
150150
public function getNumRestart()
@@ -154,7 +154,7 @@ public function getNumRestart()
154154

155155
/**
156156
* Set the Footnote and Endnote Numbering Starting Value (continuous, eachSect, eachPage)
157-
*
157+
*
158158
* @param string $numRestart
159159
* @throws \InvalidArgumentException
160160
* @return self

src/PhpWord/ComplexType/ProofState.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ final class ProofState
5151
/**
5252
* Set the Spell Checking State (dirty or clean)
5353
*
54-
* @param string $spelling
54+
* @param string $spelling
5555
* @throws \InvalidArgumentException
5656
* @return self
5757
*/
@@ -78,7 +78,7 @@ public function getSpelling()
7878
/**
7979
* Set the Grammatical Checking State (dirty or clean)
8080
*
81-
* @param string $grammar
81+
* @param string $grammar
8282
* @throws \InvalidArgumentException
8383
* @return self
8484
*/

src/PhpWord/Element/AbstractElement.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,14 @@ abstract class AbstractElement
116116

117117
/**
118118
* The start position for the linked comment
119-
*
119+
*
120120
* @var Comment
121121
*/
122122
protected $commentRangeStart;
123123

124124
/**
125125
* The end position for the linked comment
126-
*
126+
*
127127
* @var Comment
128128
*/
129129
protected $commentRangeEnd;
@@ -291,7 +291,7 @@ public function getCommentRangeStart()
291291

292292
/**
293293
* Set comment start
294-
*
294+
*
295295
* @param Comment $value
296296
*/
297297
public function setCommentRangeStart(Comment $value)

src/PhpWord/Element/Comment.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ class Comment extends TrackChange
3131

3232
/**
3333
* The Element where this comment starts
34-
*
34+
*
3535
* @var AbstractElement
3636
*/
3737
private $startElement;
3838

3939
/**
4040
* The Element where this comment ends
41-
*
41+
*
4242
* @var AbstractElement
4343
*/
4444
private $endElement;
@@ -76,7 +76,7 @@ public function getInitials()
7676

7777
/**
7878
* Sets the element where this comment starts
79-
*
79+
*
8080
* @param \PhpOffice\PhpWord\Element\AbstractElement $value
8181
*/
8282
public function setStartElement(AbstractElement $value)
@@ -89,7 +89,7 @@ public function setStartElement(AbstractElement $value)
8989

9090
/**
9191
* Get the element where this comment starts
92-
*
92+
*
9393
* @return \PhpOffice\PhpWord\Element\AbstractElement
9494
*/
9595
public function getStartElement()
@@ -99,7 +99,7 @@ public function getStartElement()
9999

100100
/**
101101
* Sets the element where this comment ends
102-
*
102+
*
103103
* @param \PhpOffice\PhpWord\Element\AbstractElement $value
104104
*/
105105
public function setEndElement(AbstractElement $value)
@@ -112,7 +112,7 @@ public function setEndElement(AbstractElement $value)
112112

113113
/**
114114
* Get the element where this comment ends
115-
*
115+
*
116116
* @return \PhpOffice\PhpWord\Element\AbstractElement
117117
*/
118118
public function getEndElement()

src/PhpWord/Element/Image.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,9 +476,9 @@ private function getArchiveImageSize($source)
476476

477477
/**
478478
* get image size from string
479-
*
479+
*
480480
* @param string $source
481-
*
481+
*
482482
* @codeCoverageIgnore this method is just a replacement for getimagesizefromstring which exists only as of PHP 5.4
483483
*/
484484
private function getStringImageSize($source)

src/PhpWord/Element/Section.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class Section extends AbstractContainer
5050

5151
/**
5252
* The properties for the footnote of this section
53-
*
53+
*
5454
* @var FootnoteProperties
5555
*/
5656
private $footnoteProperties;
@@ -148,7 +148,7 @@ public function getFooters()
148148

149149
/**
150150
* Get the footnote properties
151-
*
151+
*
152152
* @return \PhpOffice\PhpWord\Element\FooterProperties
153153
*/
154154
public function getFootnotePropoperties()
@@ -158,7 +158,7 @@ public function getFootnotePropoperties()
158158

159159
/**
160160
* Set the footnote properties
161-
*
161+
*
162162
* @param FootnoteProperties $footnoteProperties
163163
*/
164164
public function setFootnoteProperties(FootnoteProperties $footnoteProperties = null)
@@ -219,7 +219,6 @@ private function addHeaderFooter($type = Header::AUTO, $header = true)
219219
} else {
220220
throw new \Exception('Invalid header/footer type.');
221221
}
222-
223222
}
224223

225224
/**

src/PhpWord/Escaper/AbstractEscaper.php

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

2020
/**
2121
* @since 0.13.0
22-
*
22+
*
2323
* @codeCoverageIgnore
2424
*/
2525
abstract class AbstractEscaper implements EscaperInterface

src/PhpWord/Escaper/EscaperInterface.php

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

2020
/**
2121
* @since 0.13.0
22-
*
22+
*
2323
* @codeCoverageIgnore
2424
*/
2525
interface EscaperInterface

src/PhpWord/Escaper/RegExp.php

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

2020
/**
2121
* @since 0.13.0
22-
*
22+
*
2323
* @codeCoverageIgnore
2424
*/
2525
class RegExp extends AbstractEscaper

src/PhpWord/Escaper/Rtf.php

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

2020
/**
2121
* @since 0.13.0
22-
*
22+
*
2323
* @codeCoverageIgnore
2424
*/
2525
class Rtf extends AbstractEscaper

0 commit comments

Comments
 (0)