1212
1313use function array_key_exists ;
1414use function array_keys ;
15+ use function array_map ;
1516use function sprintf ;
1617
1718/**
@@ -25,7 +26,7 @@ class ReferenceRepository
2526 * List of named references to the fixture objects
2627 * gathered during fixure loading
2728 *
28- * @phpstan-var array<class-string, array<string, object>>
29+ * @phpstan-var array<class-string, array<string|int , object>>
2930 */
3031 private array $ referencesByClass = [];
3132
@@ -192,7 +193,7 @@ public function getReferenceNames(object $reference): array
192193 return [];
193194 }
194195
195- return array_keys ($ this ->referencesByClass [$ class ], $ reference , true );
196+ return array_map ( ' strval ' , array_keys ($ this ->referencesByClass [$ class ], $ reference , true ) );
196197 }
197198
198199 /**
@@ -218,7 +219,7 @@ public function getIdentitiesByClass(): array
218219 /**
219220 * Get all stored references
220221 *
221- * @phpstan-return array<class-string, array<string, object>>
222+ * @phpstan-return array<class-string, array<string|int , object>>
222223 */
223224 public function getReferencesByClass (): array
224225 {
@@ -237,6 +238,8 @@ public function getManager(): ObjectManager
237238 * Get real class name of a reference that could be a proxy
238239 *
239240 * @param string $className Class name of reference object
241+ *
242+ * @return class-string
240243 */
241244 protected function getRealClass (string $ className ): string
242245 {
0 commit comments