Skip to content

Commit e593698

Browse files
committed
refactor(database): use Tempest reflection instead of built-in one
1 parent 5361ce4 commit e593698

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/database/src/Builder/QueryBuilders/InsertQueryBuilder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,17 @@ private function getDefaultForeignKeyName(): string
140140

141141
private function convertObjectToArray(object $object, array $excludeProperties = []): array
142142
{
143-
$reflection = new \ReflectionClass($object);
143+
$reflection = new ClassReflector($object);
144144
$data = [];
145145

146-
foreach ($reflection->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) {
146+
foreach ($reflection->getPublicProperties() as $property) {
147147
if (! $property->isInitialized($object)) {
148148
continue;
149149
}
150150

151151
$propertyName = $property->getName();
152152

153-
if (! in_array($propertyName, $excludeProperties, true)) {
153+
if (! in_array($propertyName, $excludeProperties, strict: true)) {
154154
$data[$propertyName] = $property->getValue($object);
155155
}
156156
}

0 commit comments

Comments
 (0)