Skip to content

Commit a1e9800

Browse files
author
liutao
committed
update fill
1 parent 775b74a commit a1e9800

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Data.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public static function from($data): static
5353
*/
5454
public function fill(array $data): static
5555
{
56-
$this->beforeFill($data);
56+
$data = $this->beforeFill($data);
5757
if (empty($data)) {
5858
return $this;
5959
}
@@ -178,8 +178,9 @@ protected function isArrayAble($data): bool
178178
return $data instanceof ArrayAble || is_object($data) && method_exists($data, 'toArray');
179179
}
180180

181-
protected function beforeFill(array $data): void
181+
protected function beforeFill(array $data): array
182182
{
183+
return $data;
183184
}
184185

185186
protected function afterFill(array $data)

0 commit comments

Comments
 (0)