Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Table class to fix phpstan errors #8402

Merged
merged 2 commits into from
Jan 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions system/View/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Table
/**
* Data for table rows
*
* @var array
* @var list<array>|list<list<array>>
*/
public $rows = [];

Expand Down Expand Up @@ -258,7 +258,7 @@ public function setSyncRowsWithHeading(bool $orderByKey)
*
* Ensures a standard associative array format for all cell data
*
* @return array
* @return array<string, array>|list<array>
*/
protected function _prepArgs(array $args)
{
Expand Down Expand Up @@ -381,7 +381,7 @@ public function generate($tableData = null)
$cell = $cell['data'] ?? '';
$out .= $temp;

if ($cell === '' || $cell === null) {
if ($cell === '') {
$out .= $this->emptyCells;
} elseif (isset($this->function)) {
$out .= ($this->function)($cell);
Expand Down
Loading