@@ -761,12 +761,6 @@ public function cloneRow($search, $numberOfClones): void
761
761
762
762
/**
763
763
* Delete a table row in a template document.
764
- *
765
- * @param string $search
766
- *
767
- * @return void
768
- *
769
- * @throws \PhpOffice\PhpWord\Exception\Exception
770
764
*/
771
765
public function deleteRow (string $ search ): void
772
766
{
@@ -776,7 +770,7 @@ public function deleteRow(string $search): void
776
770
777
771
$ tagPos = strpos ($ this ->tempDocumentMainPart , $ search );
778
772
if (!$ tagPos ) {
779
- throw new Exception (sprintf (" Can not delete row %s, template variable not found or variable contains markup. " , $ search ));
773
+ throw new Exception (sprintf (' Can not delete row %s, template variable not found or variable contains markup. ' , $ search ));
780
774
}
781
775
782
776
$ tableStart = $ this ->findTableStart ($ tagPos );
@@ -1151,21 +1145,21 @@ protected function getDocumentContentTypesName()
1151
1145
1152
1146
/**
1153
1147
* Find the start position of the nearest table before $offset.
1154
- *
1155
- * @param integer $offset
1156
- *
1157
- * @return integer
1158
- *
1159
- * @throws \PhpOffice\PhpWord\Exception\Exception
1160
1148
*/
1161
1149
protected function findTableStart (int $ offset ): int
1162
1150
{
1163
- $ rowStart = strrpos ($ this ->tempDocumentMainPart , '<w:tbl ' ,
1164
- ((strlen ($ this ->tempDocumentMainPart ) - $ offset ) * -1 ));
1151
+ $ rowStart = strrpos (
1152
+ $ this ->tempDocumentMainPart ,
1153
+ '<w:tbl ' ,
1154
+ ((strlen ($ this ->tempDocumentMainPart ) - $ offset ) * -1 )
1155
+ );
1165
1156
1166
1157
if (!$ rowStart ) {
1167
- $ rowStart = strrpos ($ this ->tempDocumentMainPart , '<w:tbl> ' ,
1168
- ((strlen ($ this ->tempDocumentMainPart ) - $ offset ) * -1 ));
1158
+ $ rowStart = strrpos (
1159
+ $ this ->tempDocumentMainPart ,
1160
+ '<w:tbl> ' ,
1161
+ ((strlen ($ this ->tempDocumentMainPart ) - $ offset ) * -1 )
1162
+ );
1169
1163
}
1170
1164
if (!$ rowStart ) {
1171
1165
throw new Exception ('Can not find the start position of the table. ' );
@@ -1175,12 +1169,8 @@ protected function findTableStart(int $offset): int
1175
1169
}
1176
1170
1177
1171
/**
1178
- * Find the end position of the nearest table row after $offset.
1179
- *
1180
- * @param integer $offset
1181
- *
1182
- * @return integer
1183
- */
1172
+ * Find the end position of the nearest table row after $offset.
1173
+ */
1184
1174
protected function findTableEnd (int $ offset ): int
1185
1175
{
1186
1176
return strpos ($ this ->tempDocumentMainPart , '</w:tbl> ' , $ offset ) + 7 ;
0 commit comments