diff options
author | Sam Light <samlight1994@gmail.com> | 2025-04-26 13:24:23 +0100 |
---|---|---|
committer | Sam Light <samlight1994@gmail.com> | 2025-04-26 13:24:23 +0100 |
commit | a45f03193df84589c8c7a31f0695c00f761e2975 (patch) | |
tree | b7a3cb43e9f7e41bbf5a14b05e459bd3a5461bd6 /src | |
parent | 6d26688fded015141a45a88b90b2d70a0ac88420 (diff) |
Fished larastanning up to level 8
Diffstat (limited to 'src')
-rw-r--r-- | src/Columns/Column.php | 8 | ||||
-rw-r--r-- | src/Columns/ElementColumn.php | 4 | ||||
-rw-r--r-- | src/Columns/LinkColumn.php | 3 | ||||
-rw-r--r-- | src/TableComponent.php | 2 |
4 files changed, 15 insertions, 2 deletions
diff --git a/src/Columns/Column.php b/src/Columns/Column.php index ad3a787..e4c50a9 100644 --- a/src/Columns/Column.php +++ b/src/Columns/Column.php @@ -15,7 +15,6 @@ use Closure; class Column { use Makable; - /** * @var TableComponent<Model> */ @@ -23,8 +22,15 @@ class Column { private bool $showInSelect; private bool $shouldEscape = true; + /** + * @var ?Closure(Model, Column): string + */ private ?Closure $slotFn = null; private ?Closure $sortFn = null; + + /** + * @var ?Closure(Model): array<string, string> + */ private ?Closure $tdAttributesFn = null; private ?string $colClass = null; diff --git a/src/Columns/ElementColumn.php b/src/Columns/ElementColumn.php index 0e98d4a..0e78545 100644 --- a/src/Columns/ElementColumn.php +++ b/src/Columns/ElementColumn.php @@ -12,6 +12,10 @@ abstract class ElementColumn extends Column { protected string $element; + + /** + * @var ?Closure(Model): array<string, string> + */ private ?Closure $elemAttributesFn = null; public function attributes(callable $fn) : static diff --git a/src/Columns/LinkColumn.php b/src/Columns/LinkColumn.php index edb1140..5cc8407 100644 --- a/src/Columns/LinkColumn.php +++ b/src/Columns/LinkColumn.php @@ -10,6 +10,9 @@ class LinkColumn extends ElementColumn { protected string $element = 'a'; + /** + * @var Closure(Model): string + */ private Closure $urlFn; public function url(callable $fn) : static diff --git a/src/TableComponent.php b/src/TableComponent.php index affb8fd..e50fdb3 100644 --- a/src/TableComponent.php +++ b/src/TableComponent.php @@ -182,7 +182,7 @@ abstract class TableComponent extends Component protected function getFilters(): Collection { return $this->getToolbars() - ->map(fn(Toolbar $toolbar) => $toolbar->getFilters()) + ->map(fn(Toolbar $toolbar): Collection => $toolbar->getFilters()) ->flatten(); } |