Skip to content

Commit 6475812

Browse files
committed
fix documentation
1 parent 3290721 commit 6475812

File tree

6 files changed

+12
-16
lines changed

6 files changed

+12
-16
lines changed

src/PhpWord/Element/OLEObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function __construct($source, $style = null)
8383
$this->style = $this->setNewStyle(new ImageStyle(), $style, true);
8484
$this->icon = realpath(__DIR__ . "/../resources/{$ext}.png");
8585

86-
return $this;
86+
return;
8787
}
8888

8989
throw new InvalidObjectException();

src/PhpWord/Element/PreserveText.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class PreserveText extends AbstractElement
2929
/**
3030
* Text content
3131
*
32-
* @var string
32+
* @var string|array
3333
*/
3434
private $text;
3535

@@ -64,8 +64,6 @@ public function __construct($text = null, $fontStyle = null, $paragraphStyle = n
6464
if (isset($matches[0])) {
6565
$this->text = $matches;
6666
}
67-
68-
return $this;
6967
}
7068

7169
/**
@@ -91,7 +89,7 @@ public function getParagraphStyle()
9189
/**
9290
* Get Text content
9391
*
94-
* @return string
92+
* @return string|array
9593
*/
9694
public function getText()
9795
{

src/PhpWord/Element/Title.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ public function __construct($text, $depth = 1)
7474
if (array_key_exists($styleName, Style::getStyles())) {
7575
$this->style = str_replace('_', '', $styleName);
7676
}
77-
78-
return $this;
7977
}
8078

8179
/**

src/PhpWord/Metadata/Protection.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function getPassword()
113113
/**
114114
* Set password
115115
*
116-
* @param $password
116+
* @param string $password
117117
* @return self
118118
*/
119119
public function setPassword($password)
@@ -136,7 +136,7 @@ public function getSpinCount()
136136
/**
137137
* Set count for hash iterations
138138
*
139-
* @param $spinCount
139+
* @param int $spinCount
140140
* @return self
141141
*/
142142
public function setSpinCount($spinCount)
@@ -159,7 +159,7 @@ public function getAlgorithm()
159159
/**
160160
* Set algorithm
161161
*
162-
* @param $algorithm
162+
* @param string $algorithm
163163
* @return self
164164
*/
165165
public function setAlgorithm($algorithm)

src/PhpWord/Reader/Word2007/Settings.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function read(PhpWord $phpWord)
8181
*
8282
* @param XMLReader $xmlReader
8383
* @param PhpWord $phpWord
84-
* @param \DOMNode $node
84+
* @param \DOMElement $node
8585
*/
8686
protected function setThemeFontLang(XMLReader $xmlReader, PhpWord $phpWord, \DOMElement $node)
8787
{
@@ -102,7 +102,7 @@ protected function setThemeFontLang(XMLReader $xmlReader, PhpWord $phpWord, \DOM
102102
*
103103
* @param XMLReader $xmlReader
104104
* @param PhpWord $phpWord
105-
* @param \DOMNode $node
105+
* @param \DOMElement $node
106106
*/
107107
protected function setDocumentProtection(XMLReader $xmlReader, PhpWord $phpWord, \DOMElement $node)
108108
{
@@ -119,7 +119,7 @@ protected function setDocumentProtection(XMLReader $xmlReader, PhpWord $phpWord,
119119
*
120120
* @param XMLReader $xmlReader
121121
* @param PhpWord $phpWord
122-
* @param \DOMNode $node
122+
* @param \DOMElement $node
123123
*/
124124
protected function setProofState(XMLReader $xmlReader, PhpWord $phpWord, \DOMElement $node)
125125
{
@@ -141,7 +141,7 @@ protected function setProofState(XMLReader $xmlReader, PhpWord $phpWord, \DOMEle
141141
*
142142
* @param XMLReader $xmlReader
143143
* @param PhpWord $phpWord
144-
* @param \DOMNode $node
144+
* @param \DOMElement $node
145145
*/
146146
protected function setZoom(XMLReader $xmlReader, PhpWord $phpWord, \DOMElement $node)
147147
{
@@ -158,7 +158,7 @@ protected function setZoom(XMLReader $xmlReader, PhpWord $phpWord, \DOMElement $
158158
*
159159
* @param XMLReader $xmlReader
160160
* @param PhpWord $phpWord
161-
* @param \DOMNode $node
161+
* @param \DOMElement $node
162162
*/
163163
protected function setRevisionView(XMLReader $xmlReader, PhpWord $phpWord, \DOMElement $node)
164164
{

src/PhpWord/Writer/RTF/Style/Indentation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function write()
3333
{
3434
$style = $this->getStyle();
3535
if (!$style instanceof \PhpOffice\PhpWord\Style\Indentation) {
36-
return;
36+
return '';
3737
}
3838

3939
$content = '\fi' . $style->getFirstLine();

0 commit comments

Comments
 (0)