Skip to content

Commit 2c1c1ea

Browse files
author
Roman Syroeshko
committed
[IMPROVED] Dockblocks as per #187.
1 parent 4849bb2 commit 2c1c1ea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+206
-233
lines changed

src/PhpWord/Element/AbstractElement.php

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,15 @@
99

1010
namespace PhpOffice\PhpWord\Element;
1111

12+
use PhpOffice\PhpWord\Element\Element;
13+
use PhpOffice\PhpWord\Element\Footnote as FootnoteElement;
14+
use PhpOffice\PhpWord\Endnotes;
1215
use PhpOffice\PhpWord\Exception\InvalidObjectException;
16+
use PhpOffice\PhpWord\Footnotes;
1317
use PhpOffice\PhpWord\Media;
18+
use PhpOffice\PhpWord\Shared\String;
1419
use PhpOffice\PhpWord\Style;
1520
use PhpOffice\PhpWord\TOC;
16-
use PhpOffice\PhpWord\Footnotes;
17-
use PhpOffice\PhpWord\Endnotes;
18-
use PhpOffice\PhpWord\Shared\String;
19-
use PhpOffice\PhpWord\Element\Element;
20-
use PhpOffice\PhpWord\Element\Text;
21-
use PhpOffice\PhpWord\Element\TextRun;
22-
use PhpOffice\PhpWord\Element\Link;
23-
use PhpOffice\PhpWord\Element\Title;
24-
use PhpOffice\PhpWord\Element\PreserveText;
25-
use PhpOffice\PhpWord\Element\TextBreak;
26-
use PhpOffice\PhpWord\Element\ListItem;
27-
use PhpOffice\PhpWord\Element\Table;
28-
use PhpOffice\PhpWord\Element\Image;
29-
use PhpOffice\PhpWord\Element\Object;
30-
use PhpOffice\PhpWord\Element\Footnote as FootnoteElement;
31-
use PhpOffice\PhpWord\Element\Endnote;
32-
use PhpOffice\PhpWord\Element\CheckBox;
3321

3422
/**
3523
* Container abstract class
@@ -282,11 +270,12 @@ public function addImage($src, $style = null, $isWatermark = false)
282270
/**
283271
* Add OLE-object element
284272
*
285-
* All exceptions should be handled by PhpOffice\PhpWord\Element\Object
273+
* All exceptions should be handled by \PhpOffice\PhpWord\Element\Object
286274
*
287275
* @param string $src
288276
* @param mixed $style
289277
* @return Object
278+
* @throws \PhpOffice\PhpWord\Exception\Exception
290279
* @todo Enable OLE object element in header and footer
291280
*/
292281
public function addObject($src, $style = null)

src/PhpWord/Element/Cell.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Cell extends AbstractElement
2626
/**
2727
* Cell style
2828
*
29-
* @var CellStyle
29+
* @var \PhpOffice\PhpWord\Style\Cell
3030
*/
3131
private $cellStyle;
3232

@@ -36,7 +36,7 @@ class Cell extends AbstractElement
3636
* @param string $docPart section|header|footer
3737
* @param int $docPartId
3838
* @param int $width
39-
* @param array|CellStyle $style
39+
* @param array|\PhpOffice\PhpWord\Style\Cell $style
4040
*/
4141
public function __construct($docPart, $docPartId, $width = null, $style = null)
4242
{
@@ -49,7 +49,7 @@ public function __construct($docPart, $docPartId, $width = null, $style = null)
4949
/**
5050
* Get cell style
5151
*
52-
* @return CellStyle
52+
* @return \PhpOffice\PhpWord\Style\Cell
5353
*/
5454
public function getStyle()
5555
{

src/PhpWord/Element/CheckBox.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ class CheckBox extends AbstractElement
3434
/**
3535
* Text style
3636
*
37-
* @var string|Font
37+
* @var string|\PhpOffice\PhpWord\Style\Font
3838
*/
3939
private $fontStyle;
4040

4141
/**
4242
* Paragraph style
4343
*
44-
* @var string|Paragraph
44+
* @var string|\PhpOffice\PhpWord\Style\Paragraph
4545
*/
4646
private $paragraphStyle;
4747

@@ -68,7 +68,7 @@ public function __construct($name = null, $text = null, $fontStyle = null, $para
6868
*
6969
* @param mixed $style
7070
* @param mixed $paragraphStyle
71-
* @return string|Font
71+
* @return string|\PhpOffice\PhpWord\Style\Font
7272
*/
7373
public function setFontStyle($style = null, $paragraphStyle = null)
7474
{
@@ -90,7 +90,7 @@ public function setFontStyle($style = null, $paragraphStyle = null)
9090
/**
9191
* Get Text style
9292
*
93-
* @return string|Font
93+
* @return string|\PhpOffice\PhpWord\Style\Font
9494
*/
9595
public function getFontStyle()
9696
{
@@ -101,7 +101,7 @@ public function getFontStyle()
101101
* Set Paragraph style
102102
*
103103
* @param mixed $style
104-
* @return string|Paragraph
104+
* @return string|\PhpOffice\PhpWord\Style\Paragraph
105105
*/
106106
public function setParagraphStyle($style = null)
107107
{
@@ -121,7 +121,7 @@ public function setParagraphStyle($style = null)
121121
/**
122122
* Get Paragraph style
123123
*
124-
* @return string|Paragraph
124+
* @return string|\PhpOffice\PhpWord\Style\Paragraph
125125
*/
126126
public function getParagraphStyle()
127127
{

src/PhpWord/Element/Endnote.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Endnote extends Footnote
2121
/**
2222
* Create new instance
2323
*
24-
* @param string|array|Paragraph $paragraphStyle
24+
* @param string|array|\PhpOffice\PhpWord\Style\Paragraph $paragraphStyle
2525
*/
2626
public function __construct($paragraphStyle = null)
2727
{

src/PhpWord/Element/Footnote.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ class Footnote extends AbstractElement
1919
/**
2020
* Paragraph style
2121
*
22-
* @var string|Paragraph
22+
* @var string|\PhpOffice\PhpWord\Style\Paragraph
2323
*/
2424
protected $paragraphStyle;
2525

2626
/**
2727
* Create new instance
2828
*
29-
* @param string|array|Paragraph $paragraphStyle
29+
* @param string|array|\PhpOffice\PhpWord\Style\Paragraph $paragraphStyle
3030
*/
3131
public function __construct($paragraphStyle = null)
3232
{
@@ -37,7 +37,7 @@ public function __construct($paragraphStyle = null)
3737
/**
3838
* Get paragraph style
3939
*
40-
* @return string|Paragraph
40+
* @return string|\PhpOffice\PhpWord\Style\Paragraph
4141
*/
4242
public function getParagraphStyle()
4343
{

src/PhpWord/Element/Image.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ class Image extends AbstractElement
8080
* @param string $source
8181
* @param mixed $style
8282
* @param boolean $isWatermark
83-
* @throws InvalidImageException
84-
* @throws UnsupportedImageTypeException
83+
* @throws \PhpOffice\PhpWord\Exception\InvalidImageException
84+
* @throws \PhpOffice\PhpWord\Exception\UnsupportedImageTypeException
8585
*/
8686
public function __construct($source, $style = null, $isWatermark = false)
8787
{

src/PhpWord/Element/Link.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ class Link extends AbstractElement
3434
/**
3535
* Font style
3636
*
37-
* @var string|Font
37+
* @var string|\PhpOffice\PhpWord\Style\Font
3838
*/
3939
private $fontStyle;
4040

4141
/**
4242
* Paragraph style
4343
*
44-
* @var string|Paragraph
44+
* @var string|\PhpOffice\PhpWord\Style\Paragraph
4545
*/
4646
private $paragraphStyle;
4747

@@ -87,7 +87,7 @@ public function getLinkName()
8787
/**
8888
* Get Text style
8989
*
90-
* @return string|Font
90+
* @return string|\PhpOffice\PhpWord\Style\Font
9191
*/
9292
public function getFontStyle()
9393
{
@@ -97,7 +97,7 @@ public function getFontStyle()
9797
/**
9898
* Get Paragraph style
9999
*
100-
* @return string|Paragraph
100+
* @return string|\PhpOffice\PhpWord\Style\Paragraph
101101
*/
102102
public function getParagraphStyle()
103103
{

src/PhpWord/Element/ListItem.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
namespace PhpOffice\PhpWord\Element;
1111

12-
use PhpOffice\PhpWord\Element\Text;
1312
use PhpOffice\PhpWord\Style\ListItem as ListItemStyle;
1413

1514
/**
@@ -20,7 +19,7 @@ class ListItem extends AbstractElement
2019
/**
2120
* ListItem Style
2221
*
23-
* @var ListItemStyle
22+
* @var \PhpOffice\PhpWord\Style\ListItem
2423
*/
2524
private $style;
2625

src/PhpWord/Element/Object.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Object extends AbstractElement
2626
/**
2727
* Image Style
2828
*
29-
* @var ImageStyle
29+
* @var \PhpOffice\PhpWord\Style\Image
3030
*/
3131
private $style;
3232

@@ -60,7 +60,7 @@ public function __construct($src, $style = null)
6060
/**
6161
* Get Image style
6262
*
63-
* @return ImageStyle
63+
* @return \PhpOffice\PhpWord\Style\Image
6464
*/
6565
public function getStyle()
6666
{

src/PhpWord/Element/PreserveText.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ class PreserveText extends AbstractElement
2727
/**
2828
* Text style
2929
*
30-
* @var string|Font
30+
* @var string|\PhpOffice\PhpWord\Style\Font
3131
*/
3232
private $fontStyle;
3333

3434
/**
3535
* Paragraph style
3636
*
37-
* @var string|Paragraph
37+
* @var string|\PhpOffice\PhpWord\Style\Paragraph
3838
*/
3939
private $paragraphStyle;
4040

@@ -63,7 +63,7 @@ public function __construct($text = null, $styleFont = null, $styleParagraph = n
6363
/**
6464
* Get Text style
6565
*
66-
* @return string|Font
66+
* @return string|\PhpOffice\PhpWord\Style\Font
6767
*/
6868
public function getFontStyle()
6969
{
@@ -73,7 +73,7 @@ public function getFontStyle()
7373
/**
7474
* Get Paragraph style
7575
*
76-
* @return string|Paragraph
76+
* @return string|\PhpOffice\PhpWord\Style\Paragraph
7777
*/
7878
public function getParagraphStyle()
7979
{

src/PhpWord/Element/Row.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Row extends AbstractElement
2626
/**
2727
* Row style
2828
*
29-
* @var RowStyle
29+
* @var \PhpOffice\PhpWord\Style\Row
3030
*/
3131
private $style;
3232

@@ -78,7 +78,7 @@ public function getCells()
7878
/**
7979
* Get row style
8080
*
81-
* @return RowStyle
81+
* @return \PhpOffice\PhpWord\Style\Row
8282
*/
8383
public function getStyle()
8484
{

src/PhpWord/Element/Section.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Section extends AbstractElement
2121
/**
2222
* Section settings
2323
*
24-
* @var SectionSettings
24+
* @var \PhpOffice\PhpWord\Style\Section
2525
*/
2626
private $settings;
2727

@@ -77,7 +77,7 @@ public function setSettings($settings = null)
7777
/**
7878
* Get Section Settings
7979
*
80-
* @return SectionSettings
80+
* @return \PhpOffice\PhpWord\Style\Section
8181
*/
8282
public function getSettings()
8383
{
@@ -99,7 +99,7 @@ public function addPageBreak()
9999
* @param mixed $styleTOC
100100
* @param integer $minDepth
101101
* @param integer $maxDepth
102-
* @return TOC
102+
* @return \PhpOffice\PhpWord\TOC
103103
*/
104104
public function addTOC($styleFont = null, $styleTOC = null, $minDepth = 1, $maxDepth = 9)
105105
{
@@ -176,7 +176,7 @@ public function hasDifferentFirstPage()
176176
* @param string $type
177177
* @param boolean $header
178178
* @return Header|Footer
179-
* @throws Exception
179+
* @throws \PhpOffice\PhpWord\Exception\Exception
180180
* @since 0.9.2
181181
*/
182182
private function addHeaderFooter($type = Header::AUTO, $header = true)

src/PhpWord/Element/Table.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
namespace PhpOffice\PhpWord\Element;
1111

12-
use PhpOffice\PhpWord\Element\Row;
13-
use PhpOffice\PhpWord\Element\Cell;
1412
use PhpOffice\PhpWord\Style\Table as TableStyle;
1513

1614
/**
@@ -21,7 +19,7 @@ class Table extends AbstractElement
2119
/**
2220
* Table style
2321
*
24-
* @var TableStyle
22+
* @var \PhpOffice\PhpWord\Style\Table
2523
*/
2624
private $style;
2725

@@ -93,7 +91,7 @@ public function getRows()
9391
/**
9492
* Get table style
9593
*
96-
* @return TableStyle
94+
* @return \PhpOffice\PhpWord\Style\Table
9795
*/
9896
public function getStyle()
9997
{

0 commit comments

Comments
 (0)