@@ -45,7 +45,7 @@ protected function initDefaults(): void
4545 $ this ->set (Config::is_searchable, false );
4646 }
4747
48- protected function runClosure (Closure $ formatClosure ): mixed
48+ public function runClosure (Closure $ formatClosure ): mixed
4949 {
5050 $ reflection = new \ReflectionFunction ($ formatClosure );
5151
@@ -116,7 +116,7 @@ public function wrapText(bool $enable = true): static
116116 /**
117117 * @param null|Closure(Builder $query, Sorting $dir): void $sortClosure
118118 */
119- public function sortable (Closure $ sortClosure = null ): static
119+ public function sortable (? Closure $ sortClosure = null ): static
120120 {
121121 return $ this ->set (Config::is_sortable, true )
122122 ->set (Config::sort_closure, $ sortClosure );
@@ -135,7 +135,7 @@ public function hasSortClosure(): bool
135135 /**
136136 * @param (Closure(mixed $value, Model $model, Column $column): (string|null))|(Closure(Model $model, Column $column): (string|null)) $urlClosure
137137 */
138- public function url (Closure $ urlClosure , string $ target = null ): static
138+ public function url (Closure $ urlClosure , ? string $ target = null ): static
139139 {
140140 return $ this ->set (Config::url, $ urlClosure )
141141 ->set (Config::url_target, $ target );
@@ -144,7 +144,7 @@ public function url(Closure $urlClosure, string $target = null): static
144144 /**
145145 * @param (Closure(mixed $value, Model $model, Column $column): (string|array|null))|(Closure(Model $model, Column $column): (string|array|null)) $emitClosure
146146 */
147- public function emit (Closure $ emitClosure , string $ target = null ): static
147+ public function emit (Closure $ emitClosure , ? string $ target = null ): static
148148 {
149149 return $ this ->set (Config::emit, $ emitClosure );
150150 }
@@ -175,7 +175,7 @@ public function applySortClosure(Builder|Relation $query, Sorting $dir): void
175175 $ this ->get (Config::sort_closure)($ query , $ dir );
176176 }
177177
178- public function searchable (callable $ searchClosure = null ): static
178+ public function searchable (? callable $ searchClosure = null ): static
179179 {
180180 return $ this ->set (Config::is_searchable, true )
181181 ->set (Config::search_closure, $ searchClosure );
@@ -206,7 +206,7 @@ public function format(Closure $formatClosure): static
206206 return $ this ->set (Config::format_closure, $ formatClosure );
207207 }
208208
209- public function date (string $ format = null ): static
209+ public function date (? string $ format = null ): static
210210 {
211211 return $ this ->format (function ($ value ) use ($ format ) {
212212 if (empty ($ value )) {
0 commit comments