@@ -39,7 +39,7 @@ class Style
39
39
* Add paragraph style
40
40
*
41
41
* @param string $styleName
42
- * @param array $styles
42
+ * @param array|\PhpOffice\PhpWord\Style\AbstractStyle $styles
43
43
* @return \PhpOffice\PhpWord\Style\Paragraph
44
44
*/
45
45
public static function addParagraphStyle ($ styleName , $ styles )
@@ -51,8 +51,8 @@ public static function addParagraphStyle($styleName, $styles)
51
51
* Add font style
52
52
*
53
53
* @param string $styleName
54
- * @param array $fontStyle
55
- * @param array $paragraphStyle
54
+ * @param array|\PhpOffice\PhpWord\Style\AbstractStyle $fontStyle
55
+ * @param array|\PhpOffice\PhpWord\Style\AbstractStyle $paragraphStyle
56
56
* @return \PhpOffice\PhpWord\Style\Font
57
57
*/
58
58
public static function addFontStyle ($ styleName , $ fontStyle , $ paragraphStyle = null )
@@ -64,7 +64,7 @@ public static function addFontStyle($styleName, $fontStyle, $paragraphStyle = nu
64
64
* Add link style
65
65
*
66
66
* @param string $styleName
67
- * @param array $styles
67
+ * @param array|\PhpOffice\PhpWord\Style\AbstractStyle $styles
68
68
* @return \PhpOffice\PhpWord\Style\Font
69
69
*/
70
70
public static function addLinkStyle ($ styleName , $ styles )
@@ -76,7 +76,7 @@ public static function addLinkStyle($styleName, $styles)
76
76
* Add numbering style
77
77
*
78
78
* @param string $styleName
79
- * @param array $styleValues
79
+ * @param array|\PhpOffice\PhpWord\Style\AbstractStyle $styleValues
80
80
* @return \PhpOffice\PhpWord\Style\Numbering
81
81
* @since 0.10.0
82
82
*/
@@ -88,14 +88,14 @@ public static function addNumberingStyle($styleName, $styleValues)
88
88
/**
89
89
* Add title style
90
90
*
91
- * @param int $depth
92
- * @param array $fontStyle
93
- * @param array $paragraphStyle
91
+ * @param int|null $depth Provide null to set title font
92
+ * @param array|\PhpOffice\PhpWord\Style\AbstractStyle $fontStyle
93
+ * @param array|\PhpOffice\PhpWord\Style\AbstractStyle $paragraphStyle
94
94
* @return \PhpOffice\PhpWord\Style\Font
95
95
*/
96
96
public static function addTitleStyle ($ depth , $ fontStyle , $ paragraphStyle = null )
97
97
{
98
- if ($ depth == null ) {
98
+ if (empty ( $ depth) ) {
99
99
$ styleName = 'Title ' ;
100
100
} else {
101
101
$ styleName = "Heading_ {$ depth }" ;
@@ -141,7 +141,7 @@ public static function resetStyles()
141
141
/**
142
142
* Set default paragraph style
143
143
*
144
- * @param array $styles Paragraph style definition
144
+ * @param array|\PhpOffice\PhpWord\Style\AbstractStyle $styles Paragraph style definition
145
145
* @return \PhpOffice\PhpWord\Style\Paragraph
146
146
*/
147
147
public static function setDefaultParagraphStyle ($ styles )
0 commit comments