Skip to content

Commit 065f822

Browse files
committed
Add return types
1 parent e9fd6d5 commit 065f822

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Casts/NameCast.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function __construct(?string $firstName = null, ?string $lastName = null)
1919
$this->lastName = $lastName ?: 'last_name';
2020
}
2121

22-
public function get($model, string $key, $value, array $attributes)
22+
public function get($model, string $key, $value, array $attributes): Name
2323
{
2424
if ($value) {
2525
return Name::from($value);
@@ -31,7 +31,7 @@ public function get($model, string $key, $value, array $attributes)
3131
return Name::from("{$firstName} {$lastName}");
3232
}
3333

34-
public function set($model, string $key, $value, array $attributes)
34+
public function set($model, string $key, $value, array $attributes): string
3535
{
3636
return (string) $value;
3737
}

0 commit comments

Comments
 (0)