-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
docs: fix PHPDocs for View
#8848
Conversation
*/ | ||
public $rows = []; | ||
|
||
/** | ||
* Data for table heading | ||
* | ||
* @var array | ||
* @var array<int, mixed> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible that the element value is not a string?
*/ | ||
public $heading = []; | ||
|
||
/** | ||
* Data for table footing | ||
* | ||
* @var array | ||
* @var array<int, mixed> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible that the element value is not a string?
@@ -297,7 +300,7 @@ public function setCaption($caption) | |||
/** | |||
* Generate the table | |||
* | |||
* @param array|BaseResult|null $tableData | |||
* @param array<int, mixed>|BaseResult|null $tableData |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like this?
* @param array<int, mixed>|BaseResult|null $tableData | |
* @param BaseResult|list<array<int|string, float|int|string>>|null $tableData |
var_export($tableData, true)
:
DEBUG - 2024-05-06 01:06:12 --> NULL
DEBUG - 2024-05-06 01:06:12 --> array (
0 =>
array (
0 => 'Name',
1 => 'Color',
2 => 'Size',
),
1 =>
array (
0 => 'Fred',
1 => 'Blue',
2 => 'Small',
),
2 =>
array (
0 =>
array (
'data' => 'Mary',
'class' => 'cssMary',
),
1 =>
array (
'data' => 'Red',
'class' => 'cssRed',
),
2 =>
array (
'data' => 'Large',
'class' => 'cssLarge',
),
),
3 =>
array (
0 => 'John',
1 => 'Green',
2 => 'Medium',
),
)
DEBUG - 2024-05-06 01:06:12 --> NULL
DEBUG - 2024-05-06 01:06:12 --> NULL
DEBUG - 2024-05-06 01:06:12 --> NULL
DEBUG - 2024-05-06 01:06:12 --> NULL
DEBUG - 2024-05-06 01:06:12 --> array (
0 =>
array (
0 => 'Name',
1 => 'Color',
2 => 'Size',
),
1 =>
array (
0 => 'Fred',
1 => 'Blue',
2 => 'Small',
),
2 =>
array (
0 => 'Mary',
1 => 'Red',
2 => NULL,
),
3 =>
array (
0 => 'John',
1 => 'Green',
2 => 'Medium',
),
)
DEBUG - 2024-05-06 01:06:12 --> array (
0 =>
array (
0 => 'Name',
1 => 'Color',
2 => 'Size',
),
1 =>
array (
0 => 'Fred',
1 => 'Blue',
2 => 'Small',
),
2 =>
array (
0 => 'Mary',
1 => 'Red',
2 => 'Large',
),
3 =>
array (
0 => 'John',
1 => 'Green',
2 => 'Medium',
),
)
DEBUG - 2024-05-06 01:06:12 --> CodeIgniter\View\DBResultDummy::__set_state(array(
'connID' => NULL,
'resultID' => NULL,
'resultArray' =>
array (
),
'resultObject' =>
array (
),
'customResultObject' =>
array (
),
'currentRow' => 0,
'numRows' => NULL,
'rowData' => NULL,
))
DEBUG - 2024-05-06 01:06:12 --> array (
)
DEBUG - 2024-05-06 01:06:12 --> NULL
DEBUG - 2024-05-06 01:06:12 --> NULL
DEBUG - 2024-05-06 01:06:12 --> NULL
DEBUG - 2024-05-06 01:06:12 --> NULL
DEBUG - 2024-05-06 01:06:12 --> NULL
DEBUG - 2024-05-06 01:06:12 --> NULL
DEBUG - 2024-05-06 01:06:12 --> array (
0 =>
array (
'name' => 'Max',
'age' => 30,
'id' => 5,
),
)
DEBUG - 2024-05-06 01:06:12 --> array (
0 =>
array (
'name' => 'Fred',
'age' => 30,
'id' => 5,
),
)
DEBUG - 2024-05-06 01:06:12 --> array (
0 =>
array (
'name' => 'Fred',
'age' => 30,
'id' => 5,
),
)
DEBUG - 2024-05-06 01:06:12 --> array (
0 =>
array (
'name' => 'Fred',
'id' => 5,
),
)
DEBUG - 2024-05-06 01:06:12 --> array (
0 =>
array (
'id' => 1,
'id_cliente' => 1,
'codigo' => 'codigo1',
'data' => '2023-10-16 21:53:25',
'tipo_desconto' => 'NENHUM',
'valor_desconto' => '',
'created_at' => '2023-10-16 21:53:25',
'updated_at' => '2023-10-16 21:53:25',
'deleted_at' => '',
),
1 =>
array (
'id' => 2,
'id_cliente' => 2,
'codigo' => 'codigo2',
'data' => '2023-10-16 21:53:25',
'tipo_desconto' => 'REAL',
'valor_desconto' => 10.0,
'created_at' => '2023-10-16 21:53:25',
'updated_at' => '2023-10-16 21:53:25',
'deleted_at' => '',
),
2 =>
array (
'id' => 3,
'id_cliente' => 3,
'codigo' => 'codigo3',
'data' => '2023-10-16 21:53:25',
'tipo_desconto' => 'PERCENTUAL',
'valor_desconto' => 10.0,
'created_at' => '2023-10-16 21:53:25',
'updated_at' => '2023-10-16 21:53:25',
'deleted_at' => '',
),
)
* | ||
* @return array|false | ||
* @return array<int, mixed>|false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like this?
* @return array<int, mixed>|false | |
* @return false|list<list<string>>|list<string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Frankly, I am not sure of the exact type of the Table class.
However, I think this PR is not wrong, so I will merge it.
Description
See #8732
Checklist: