Skip to content

Commit f5e37be

Browse files
committed
Refactor Meta object
1 parent 724b23f commit f5e37be

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/V1/Meta.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,7 @@ protected function parse(mixed $object): void
3131
throw new ValidationException('Meta has to be an object, "' . gettype($object) . '" given.');
3232
}
3333

34-
$object_vars = get_object_vars($object);
35-
36-
if (count($object_vars) === 0) {
37-
return;
38-
}
39-
40-
foreach ($object_vars as $name => $value) {
34+
foreach (get_object_vars($object) as $name => $value) {
4135
$this->set($name, $value);
4236
}
4337
}

0 commit comments

Comments
 (0)