File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ final class Typecast implements CastableInterface, UncastableInterface
47
47
private array $ casters = [];
48
48
49
49
/** @var array<non-empty-string, \Closure(mixed): mixed> */
50
- private array $ uncaters = [];
50
+ private array $ uncasters = [];
51
51
52
52
/**
53
53
* @param non-empty-string $role The role of the entity being typecasted
@@ -80,7 +80,7 @@ public function setRules(array $rules): array
80
80
};
81
81
82
82
if ($ rule === 'json ' ) {
83
- $ this ->uncaters [$ key ] = static fn (mixed $ value ): string => \json_encode (
83
+ $ this ->uncasters [$ key ] = static fn (mixed $ value ): string => \json_encode (
84
84
$ value ,
85
85
\JSON_UNESCAPED_UNICODE | \JSON_THROW_ON_ERROR | JSON_INVALID_UTF8_SUBSTITUTE ,
86
86
);
@@ -167,7 +167,7 @@ public function cast(array $data): array
167
167
public function uncast (array $ data ): array
168
168
{
169
169
try {
170
- foreach ($ this ->uncaters as $ key => $ callable ) {
170
+ foreach ($ this ->uncasters as $ key => $ callable ) {
171
171
if (isset ($ data [$ key ])) {
172
172
$ data [$ key ] = $ callable ($ data [$ key ]);
173
173
}
You can’t perform that action at this time.
0 commit comments