@@ -1067,7 +1067,7 @@ public function setProtection(Protection $protection)
1067
1067
*
1068
1068
* @return string Highest column name
1069
1069
*/
1070
- public function getHighestColumn ($ row = null )
1070
+ public function getHighestColumn ($ row = null ): string
1071
1071
{
1072
1072
if ($ row === null ) {
1073
1073
return Coordinate::stringFromColumnIndex ($ this ->cachedHighestColumn );
@@ -1084,7 +1084,7 @@ public function getHighestColumn($row = null)
1084
1084
*
1085
1085
* @return string Highest column name that contains data
1086
1086
*/
1087
- public function getHighestDataColumn ($ row = null )
1087
+ public function getHighestDataColumn ($ row = null ): string
1088
1088
{
1089
1089
return $ this ->cellCollection ->getHighestColumn ($ row );
1090
1090
}
@@ -1097,7 +1097,7 @@ public function getHighestDataColumn($row = null)
1097
1097
*
1098
1098
* @return int Highest row number
1099
1099
*/
1100
- public function getHighestRow ($ column = null )
1100
+ public function getHighestRow (? string $ column = null ): int
1101
1101
{
1102
1102
if ($ column === null ) {
1103
1103
return $ this ->cachedHighestRow ;
@@ -1114,19 +1114,31 @@ public function getHighestRow($column = null)
1114
1114
*
1115
1115
* @return int Highest row number that contains data
1116
1116
*/
1117
- public function getHighestDataRow ($ column = null )
1117
+ public function getHighestDataRow (? string $ column = null ): int
1118
1118
{
1119
1119
return $ this ->cellCollection ->getHighestRow ($ column );
1120
1120
}
1121
1121
1122
+ /**
1123
+ * Get highest worksheet column and highest row.
1124
+ *
1125
+ * @return string Highest column name and highest row number
1126
+ */
1127
+ public function getHighestRowAndColumn (): string
1128
+ {
1129
+ return $ this ->getHighestColumn () . $ this ->getHighestRow ();
1130
+ }
1131
+
1122
1132
/**
1123
1133
* Get highest worksheet column and highest row that have cell records.
1124
1134
*
1125
- * @return array Highest column name and highest row number
1135
+ * @return string Highest column name and highest row number
1126
1136
*/
1127
- public function getHighestRowAndColumn ()
1137
+ public function getHighestDataRowAndColumn (): string
1128
1138
{
1129
- return $ this ->cellCollection ->getHighestRowAndColumn ();
1139
+ $ highestRowAndColumn = $ this ->cellCollection ->getHighestRowAndColumn ();
1140
+
1141
+ return $ highestRowAndColumn ['column ' ] . $ highestRowAndColumn ['row ' ];
1130
1142
}
1131
1143
1132
1144
/**
0 commit comments