Commit 88f9159
authored
fix: Ensure $actions property is explicitly typed as array in UserDataTable
This commit fixes a type error in the UserDataTable class by explicitly typing the $actions property as an array. This change aligns with the expected type in the Yajra\DataTables\Services\DataTable class, preventing runtime errors and ensuring consistent data handling.
- Updated the $actions property declaration from `protected $actions = ['print', 'excel', 'myCustomAction'];` to `protected array $actions = ['print', 'excel', 'myCustomAction'];`.
- This change leverages PHP's property type declaration feature to enforce that $actions is always an array.
- The modification enhances code robustness and readability, ensuring type safety and preventing potential issues related to incorrect data types.
By making this update, the UserDataTable class now correctly adheres to the expected data structure, improving overall stability and maintainability.1 parent e38121e commit 88f9159
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
0 commit comments