Skip to content

Commit b556853

Browse files
committed
Allow null returns
1 parent 1103604 commit b556853

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/DataTableAbstract.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -975,9 +975,9 @@ protected function setupKeyword(string $value): string
975975
*
976976
* @param int $index
977977
* @param bool $wantsAlias
978-
* @return string
978+
* @return string|null
979979
*/
980-
protected function getColumnName(int $index, bool $wantsAlias = false): string
980+
protected function getColumnName(int $index, bool $wantsAlias = false): ?string
981981
{
982982
$column = $this->request->columnName($index);
983983

src/Utilities/Request.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,14 @@ public function keyword(): string
224224
* Get column identity from input or database.
225225
*
226226
* @param int $i
227-
* @return string
227+
* @return string|null
228228
*/
229-
public function columnName(int $i): string
229+
public function columnName(int $i): ?string
230230
{
231231
/** @var string[] $column */
232232
$column = $this->request->input("columns.$i");
233233

234-
return isset($column['name']) && $column['name'] != '' ? $column['name'] : $column['data'];
234+
return (isset($column['name']) && $column['name'] != '') ? $column['name'] : $column['data'];
235235
}
236236

237237
/**

0 commit comments

Comments
 (0)