diff --git a/src/Form/Layout/FormLayoutColumn.php b/src/Form/Layout/FormLayoutColumn.php index 254480088..62957d55c 100644 --- a/src/Form/Layout/FormLayoutColumn.php +++ b/src/Form/Layout/FormLayoutColumn.php @@ -6,11 +6,12 @@ class FormLayoutColumn extends LayoutColumn implements HasLayout { + /** * @param (\Closure(FormLayoutFieldset): mixed)|null $callback * @return $this */ - public function withFieldset(string $name, ?\Closure $callback = null): self + public function withFieldset(string $name, ?\Closure $callback = null): static { $fieldset = new FormLayoutFieldset($name); diff --git a/src/Form/Layout/HasFieldRows.php b/src/Form/Layout/HasFieldRows.php index 69528f285..fbe72da05 100644 --- a/src/Form/Layout/HasFieldRows.php +++ b/src/Form/Layout/HasFieldRows.php @@ -15,7 +15,7 @@ trait HasFieldRows protected array $rows = []; /** @deprecated use withField() or withListField() instead */ - public function withSingleField(string $fieldKey, ?\Closure $subLayoutCallback = null): self + public function withSingleField(string $fieldKey, ?\Closure $subLayoutCallback = null): static { if ($subLayoutCallback) { return $this->withListField($fieldKey, $subLayoutCallback); @@ -24,7 +24,7 @@ public function withSingleField(string $fieldKey, ?\Closure $subLayoutCallback = return $this->withField($fieldKey); } - public function withField(string $fieldKey): self + public function withField(string $fieldKey): static { $this->addRowLayout([ $this->newLayoutField($this->normalizedFieldsRow([$fieldKey])->first()), @@ -37,7 +37,7 @@ public function withField(string $fieldKey): self * @param (\Closure(LayoutColumn): mixed) $subLayoutCallback * @return $this */ - public function withListField(string $fieldKey, Closure $subLayoutCallback): self + public function withListField(string $fieldKey, Closure $subLayoutCallback): static { $this->addRowLayout([ $this->newLayoutField($fieldKey, $subLayoutCallback), @@ -46,7 +46,7 @@ public function withListField(string $fieldKey, Closure $subLayoutCallback): sel return $this; } - public function withFields(string|int ...$fieldKeys): self + public function withFields(string|int ...$fieldKeys): static { $this ->addRowLayout( @@ -62,7 +62,7 @@ public function withFields(string|int ...$fieldKeys): self * @param (\Closure(LayoutColumn): mixed)|null $subLayoutCallback * @return $this */ - public function insertSingleFieldAt(int $index, string $fieldKey, ?\Closure $subLayoutCallback = null): self + public function insertSingleFieldAt(int $index, string $fieldKey, ?\Closure $subLayoutCallback = null): static { $rows = collect($this->rows); $rows->splice($index, 0, [[$this->newLayoutField($fieldKey, $subLayoutCallback)]]); @@ -71,7 +71,7 @@ public function insertSingleFieldAt(int $index, string $fieldKey, ?\Closure $sub return $this; } - public function insertFieldsAt(int $index, string ...$fieldKeys): self + public function insertFieldsAt(int $index, string ...$fieldKeys): static { $rows = collect($this->rows); $rows->splice($index, 0, [