Skip to content

Commit b18f517

Browse files
authored
Merge pull request acseo#46 from pierre-H/patch-2
improve typing of castValue
2 parents 6980cee + 4bbb8e9 commit b18f517

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Transformer/DoctrineToTypesenseTransformer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function __construct(array $collectionDefinitions, PropertyAccessorInterf
2525
}
2626
}
2727

28-
public function convert($entity)
28+
public function convert($entity): array
2929
{
3030
$entityClass = ClassUtils::getClass($entity);
3131

@@ -56,11 +56,11 @@ public function convert($entity)
5656
return $data;
5757
}
5858

59-
public function castValue($entityClass, $name, $value)
59+
public function castValue(string $entityClass, string $propertyName, $value)
6060
{
6161
$collection = $this->entityToCollectionMapping[$entityClass];
6262
$key = array_search(
63-
$name,
63+
$propertyName,
6464
array_column(
6565
$this->collectionDefinitions[$collection]['fields'],
6666
'name'

0 commit comments

Comments
 (0)